I am trying to write a program in C# that will connect to an FTP site, download a .gz that contains hundreds of files, extract those files to a local folder, then close the connection. Are there any examples available of this being done? Do I have to write it in two steps:
1) FTP download file to local folder
2) Extract the files
Or is it possible to extract it in the stream? I am very new at this whole stream and compression thing, so any help would be appreciated!
Imported from legacy forums. Posted by Heavy (had 1423 views)
You can use the FtpClient.ReceiveFile( String, Stream ) method overload, which will permit you to receive the file into a stream. You can wrap a MemoryFile around that stream, and use that MemoryFile to extract the files to the local disk.
Imported from legacy forums. Posted by André (had 1257 views)