ComponentPro UltimateFtp

      Read part of a remote file

      Language Filter: AllSend comments on this topic to ComponentPro

      To download part of a remote file, specify the remoteOffset and length parameters of this DownloadFile method overload.

      // Create a new class instance.
      Ftp client = new Ftp();
      
      // Connect to the FTP server.
      client.Connect("localhost");
      
      // Authenticate.
      client.Authenticate("test", "test");
      
      // ... 
       
      // Download remote file '/test.dat' to 'c:\test.dat'
      client.DownloadFile("/test.dat", "c:\\test.dat", 1024, 1024, -1);
      
      // ... 
       
      // Disconnect.
      client.Disconnect();