Sftp |
public class SftpClient : BaseClient
The SftpClient type exposes the following members.
| Name | Description | |
|---|---|---|
| SftpClient(ConnectionInfo) | Initializes a new instance of the SftpClient class. | |
| SftpClient(String, String, PrivateKeyFile) | Initializes a new instance of the SftpClient class. | |
| SftpClient(String, String, String) | Initializes a new instance of the SftpClient class. | |
| SftpClient(String, Int32, String, PrivateKeyFile) | Initializes a new instance of the SftpClient class. | |
| SftpClient(String, Int32, String, String) | Initializes a new instance of the SftpClient class. |
| Name | Description | |
|---|---|---|
| BufferSize | Gets or sets the size of the buffer. | |
| IsConnected |
Gets a value indicating whether this client is connected to the server.
(Inherited from BaseClient) | |
| KeepAliveInterval |
Gets or sets the keep alive interval in seconds.
(Inherited from BaseClient) | |
| OperationTimeout | Gets or sets the operation timeout. | |
| ProtocolVersion | Gets sftp protocol version. | |
| WorkingDirectory | Gets remote working directory. |
| Name | Description | |
|---|---|---|
| AppendAllLines(String, IEnumerableString) | Appends lines to a file, and then closes the file. | |
| AppendAllLines(String, IEnumerableString, Encoding) | Appends lines to a file by using a specified encoding, and then closes the file. | |
| AppendAllText(String, String) | Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file. | |
| AppendAllText(String, String, Encoding) | Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file. | |
| AppendText(String) | Creates a StreamWriter that appends UTF-8 encoded text to an existing file. | |
| AppendText(String, Encoding) | Creates a StreamWriter that appends UTF-8 encoded text to an existing file. | |
| BeginDownloadFile(String, Stream) | Begins an asynchronous file downloading into the stream. | |
| BeginDownloadFile(String, Stream, AsyncCallback) | Begins an asynchronous file downloading into the stream. | |
| BeginDownloadFile(String, Stream, AsyncCallback, Object, ActionUInt64) | Begins an asynchronous file downloading into the stream. | |
| BeginListDirectory | Begins an asynchronous operation of retrieving list of files in remote directory. | |
| BeginSynchronizeDirectories | Begins the synchronize directories. | |
| BeginUploadFile(Stream, String) | Begins an asynchronous uploading the steam into remote file. | |
| BeginUploadFile(Stream, String, AsyncCallback) | Begins an asynchronous uploading the steam into remote file. | |
| BeginUploadFile(Stream, String, AsyncCallback, Object, ActionUInt64) | Begins an asynchronous uploading the steam into remote file. | |
| BeginUploadFile(Stream, String, Boolean, AsyncCallback, Object, ActionUInt64) | Begins an asynchronous uploading the steam into remote file. | |
| ChangeDirectory | Changes remote directory to path. | |
| ChangePermissions | Changes permissions of file(s) to specified mode. | |
| Connect |
Connects client to the server.
(Inherited from BaseClient) | |
| Create(String) | Creates or overwrites a file in the specified path. | |
| Create(String, Int32) | Creates or overwrites the specified file. | |
| CreateDirectory | Creates remote directory specified by path. | |
| CreateText(String) | Creates or opens a file for writing UTF-8 encoded text. | |
| CreateText(String, Encoding) | Creates or opens a file for writing UTF-8 encoded text. | |
| Delete | Deletes the specified file or directory. An exception is not thrown if the specified file does not exist. | |
| DeleteDirectory | Deletes remote directory specified by path. | |
| DeleteFile | Deletes remote file specified by path. | |
| Disconnect |
Disconnects client from the server.
(Inherited from BaseClient) | |
| Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged ResourceMessages.
(Inherited from BaseClient) | |
| Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources
(Overrides BaseClientDispose(Boolean)) | |
| DownloadFile | Downloads remote file specified by the path into the stream. | |
| EndDownloadFile | Ends an asynchronous file downloading into the stream. | |
| EndListDirectory | Ends an asynchronous operation of retrieving list of files in remote directory. | |
| EndSynchronizeDirectories | Ends the synchronize directories. | |
| EndUploadFile | Ends an asynchronous uploading the steam into remote file. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Exists | Checks whether file pr directory exists; | |
| Finalize |
Releases unmanaged resources and performs other cleanup operations before the
BaseClient is reclaimed by garbage collection.
(Inherited from BaseClient) | |
| Get | Gets reference to remote file or directory. | |
| GetAttributes | Gets the SftpFileAttributes of the file on the path. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetLastAccessTime | Returns the date and time the specified file or directory was last accessed. | |
| GetLastAccessTimeUtc | Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed. | |
| GetLastWriteTime | Returns the date and time the specified file or directory was last written to. | |
| GetLastWriteTimeUtc | Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to. | |
| GetStatus | Gets status using statvfs@openssh.com request. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| ListDirectory | Retrieves list of files in remote directory. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| OnConnected |
Called when client is connected to the server.
(Overrides BaseClientOnConnected) | |
| OnConnecting |
Called when client is connecting to the server.
(Inherited from BaseClient) | |
| OnDisconnected |
Called when client is disconnected from the server.
(Inherited from BaseClient) | |
| OnDisconnecting |
Called when client is disconnecting from the server.
(Overrides BaseClientOnDisconnecting) | |
| Open(String, FileMode) | Opens a SftpFileStream on the specified path with read/write access. | |
| Open(String, FileMode, FileAccess) | Opens a SftpFileStream on the specified path, with the specified mode and access. | |
| OpenRead | Opens an existing file for reading. | |
| OpenText | Opens an existing UTF-8 encoded text file for reading. | |
| OpenWrite | Opens an existing file for writing. | |
| ReadAllBytes | Opens a binary file, reads the contents of the file into a byte array, and then closes the file. | |
| ReadAllLines(String) | Opens a text file, reads all lines of the file, and then closes the file. | |
| ReadAllLines(String, Encoding) | Opens a file, reads all lines of the file with the specified encoding, and then closes the file. | |
| ReadAllText(String) | Opens a text file, reads all lines of the file, and then closes the file. | |
| ReadAllText(String, Encoding) | Opens a file, reads all lines of the file with the specified encoding, and then closes the file. | |
| ReadLines(String) | Reads the lines of a file. | |
| ReadLines(String, Encoding) | Read the lines of a file that has a specified encoding. | |
| RenameFile(String, String) | Renames remote file from old path to new path. | |
| RenameFile(String, String, Boolean) | Renames remote file from old path to new path. | |
| SendKeepAlive |
Sends keep-alive message to the server.
(Inherited from BaseClient) | |
| SetAttributes | Sets the specified SftpFileAttributes of the file on the specified path. | |
| SetLastWriteTime | Obsolete. Sets the date and time that the specified file was last written to. | |
| SetLastWriteTimeUtc | Obsolete. Sets the date and time, in coordinated universal time (UTC), that the specified file was last written to. | |
| SymbolicLink | Creates a symbolic link from old path to new path. | |
| SynchronizeDirectories | Synchronizes the directories. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| UploadFile(Stream, String, ActionUInt64) | Uploads stream into remote file.. | |
| UploadFile(Stream, String, Boolean, ActionUInt64) | Uploads stream into remote file.. | |
| WriteAllBytes | Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten. | |
| WriteAllLines(String, IEnumerableString) | Creates a new file, writes a collection of strings to the file, and then closes the file. | |
| WriteAllLines(String, String) | Creates a new file, write the specified string array to the file, and then closes the file. | |
| WriteAllLines(String, IEnumerableString, Encoding) | Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file. | |
| WriteAllLines(String, String, Encoding) | Creates a new file, writes the specified string array to the file by using the specified encoding, and then closes the file. | |
| WriteAllText(String, String) | Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten. | |
| WriteAllText(String, String, Encoding) | Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten. |
| Name | Description | |
|---|---|---|
| ErrorOccurred |
Occurs when an error occurred.
(Inherited from BaseClient) | |
| HostKeyReceived |
Occurs when host key received.
(Inherited from BaseClient) |