SftpClient
Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
Gets or sets the maximum size of the buffer in bytes.
Gets or sets the operation timeout.
Gets sftp protocol version.
Gets remote working directory.
Initializes a new instance of the SftpClient class.
Initializes a new instance of the SftpClient class.
Initializes a new instance of the SftpClient class.
Initializes a new instance of the SftpClient class.
Initializes a new instance of the SftpClient class.
Appends lines to a file, and closes the file.
Appends lines to a file by using a specified encoding, and closes the file.
Appends the specified string to the file, and closes the file.
Appends the specified string to the file, and closes the file.
Creates a StreamWriter that appends UTF-8 encoded text to an existing file.
Creates a StreamWriter that appends text to an existing file using the specified encoding.
Begins an asynchronous file downloading into the stream.
Begins an asynchronous file downloading into the stream.
public IAsyncResult BeginDownloadFile(string path, Stream output, AsyncCallback asyncCallback, object state, Action<ulong> downloadCallback = null)
Begins an asynchronous file downloading into the stream.
public IAsyncResult BeginListDirectory(string path, AsyncCallback asyncCallback, object state, Action<int> listCallback = null)
Begins an asynchronous operation of retrieving list of files in remote directory.
public IAsyncResult BeginSynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern, AsyncCallback asyncCallback, object state)
Begins the synchronize directories.
Begins an asynchronous uploading the stream into remote file.
Begins an asynchronous uploading the stream into remote file.
public IAsyncResult BeginUploadFile(Stream input, string path, AsyncCallback asyncCallback, object state, Action<ulong> uploadCallback = null)
Begins an asynchronous uploading the stream into remote file.
public IAsyncResult BeginUploadFile(Stream input, string path, bool canOverride, AsyncCallback asyncCallback, object state, Action<ulong> uploadCallback = null)
Begins an asynchronous uploading the stream into remote file.
Changes remote directory to path.
Changes permissions of file(s) to specified mode.
Creates or overwrites a file in the specified path.
Creates or overwrites the specified file.
Creates remote directory specified by path.
Creates or opens a file for writing UTF-8 encoded text.
Creates or opens a file for writing text using the specified encoding.
Deletes the specified file or directory.
Deletes remote directory specified by path.
Deletes remote file specified by path.
Downloads remote file specified by the path into the stream.
Ends an asynchronous file downloading into the stream.
Ends an asynchronous operation of retrieving list of files in remote directory.
Ends the synchronize directories.
Ends an asynchronous uploading the stream into remote file.
Checks whether file or directory exists;
Gets reference to remote file or directory.
Gets the SftpFileAttributes of the file on the path.
Returns the date and time the specified file or directory was last accessed.
Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed.
Returns the date and time the specified file or directory was last written to.
Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.
Gets status using statvfs@openssh.com request.
Retrieves list of files in remote directory.
Opens a SftpFileStream on the specified path with read/write access.
Opens a SftpFileStream on the specified path, with the specified mode and access.
Opens an existing file for reading.
Opens an existing UTF-8 encoded text file for reading.
Opens a file for writing.
Opens a binary file, reads the contents of the file into a byte array, and closes the file.
Opens a text file, reads all lines of the file using UTF-8 encoding, and closes the file.
Opens a file, reads all lines of the file with the specified encoding, and closes the file.
Opens a text file, reads all lines of the file with the UTF-8 encoding, and closes the file.
Opens a file, reads all lines of the file with the specified encoding, and closes the file.
Reads the lines of a file with the UTF-8 encoding.
Read the lines of a file that has a specified encoding.
Renames remote file from old path to new path.
Renames remote file from old path to new path.
Sets the specified SftpFileAttributes of the file on the specified path.
Sets the date and time the specified file was last accessed.
Sets the date and time, in coordinated universal time (UTC), that the specified file was last accessed.
Sets the date and time that the specified file was last written to.
Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to.
Creates a symbolic link from old path to new path.
public IEnumerable<FileInfo> SynchronizeDirectories(string sourcePath, string destinationPath, string searchPattern)
Synchronizes the directories.
Uploads stream into remote file.
public void UploadFile(Stream input, string path, bool canOverride, Action<ulong> uploadCallback = null)
Uploads stream into remote file.
Writes the specified byte array to the specified file, and closes the file.
Writes a collection of strings to the file using the UTF-8 encoding, and closes the file.
Write the specified string array to the file using the UTF-8 encoding, and closes the file.
Writes a collection of strings to the file using the specified encoding, and closes the file.
Writes the specified string array to the file by using the specified encoding, and closes the file.
Writes the specified string to the file using the UTF-8 encoding, and closes the file.
Writes the specified string to the file using the specified encoding, and closes the file.