"Fossies" - the Fresh Open Source Software Archive

Member "FTPRush/scripts/FileViewTransfer.cs" (5 Mar 2021, 580 Bytes) of package /windows/misc/FTPRush.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 //This script will first set firstview to local mode and switch to the "Documents" directory, 
    2 //then let secondView connect to the demo.wftpserver.com server and switch to the "download" directory.
    3 //Finally start to download "Autumn.jpg" and "Spring.jpg".
    4 FirstView.SwitchToLocal();
    5 await FirstView.ChangeDir("~Documents");
    6 Server source = new Server{ Host ="demo.wftpserver.com", Username="demo", Password="demo" };
    7 await SecondView.Connect(source);
    8 await SecondView.ChangeDir("download");
    9 SecondView.TransferFile("Autumn.jpg");
   10 SecondView.TransferFile("/download/Spring.jpg");