![]() FtpReply SendCommand(FtpSessionHandle session, string command, params string parameters) sends a command and returns a raw FTP reply.FtpSession Session() uses or create a session (this allows mutiple connections at same time with only one FtpClient).bool Features.HasFeature(string feature) indicates if a feature is supported by the server (the method is a method from the Features member of FtpClient).You don't manipulate sessions directly but they are used by the client). Usually it uses only one session, and reuses it command after command. IEnumerable MlsdEntries(this FtpClient ftpClient, FtpPath path) lists a directory content and returns parsed Note that all commands use an FtpPath instance, which has an automatic implicit constructor from string, so you can just use strings as parameters, the implicit conversion will do the trick.įor the hard-core developpers, here are some useful low-level commands.įirst of all, it is necessary to understand that the FtpClient instance can handle multiple connections at the same time (thus, it uses one separate connection to send one command).IList Mlsd(this FtpClient ftpClient, FtpPath path) lists a directory content and returns raw lines.FtpEntry MlstEntry(this FtpClient ftpClient, FtpPath path) gets a file status.IList Mlst(this FtpClient ftpClient, FtpPath path) gets a file status (raw form).FtpEntry GetEntry(this FtpClient ftpClient, FtpPath path) gets informations about a file or directory.void RnfrTo(this FtpClient ftpClient, FtpPath from, FtpPath to) renames/moves a file/directory. ![]() bool Delete(this FtpClient ftpClient, FtpPath path) removes the entry, whenever it is a file or directory.bool Dele(this FtpClient ftpClient, FtpPath path) removes the file.bool Rmd(this FtpClient ftpClient, FtpPath path) removes the directory.Stream Stor(this FtpClient ftpClient, FtpPath path) creates a file for uploading.Stream Retr(this FtpClient ftpClient, FtpPath path, FtpTransferMode mode = FtpTransferMode.Binary) opens a file for downloading.IEnumerable StatEntries(this FtpClient ftpClient, FtpPath path) lists a directory using the STAT command and returns parsed entries.IEnumerable Stat(this FtpClient ftpClient, FtpPath path) lists a directory content using the STAT command and returns raw lines.IEnumerable ListEntries(this FtpClient ftpClient, FtpPath path) lists a directory content and returns parsed entries.IList List(this FtpClient ftpClient, FtpPath path) lists a directory content and returns raw lines.They are implemented in the form of extension methods to FtpClient Using ( var ftpClient = new FtpClient( ftpUri, ftpCredentials))
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |