|
How to change directories
|
|
While you are connected to an FTP server, the server keeps track of your working directory.
The server assumes you are referring to this directory whenever you perform a file operation
without specifying an absolute path.
string directory = ftpConnection.WorkingDirectory;
This may be changed using:
ftpConnection.ChangeWorkingDirectory(directory);
Or to simply go up to the parent directory:
ftpConnection.ChangeWorkingDirectoryUp();
Note that ExFTPConnection also offers asynchronous
versions of these methods. These are
recommended for improving the responsiveness of GUI applications. Please refer to the How
to use asynchronous methods topic to learn more about this.