Method | Description | |
---|---|---|
AppendAllLines ( string path, IEnumerable |
Appends lines to a file, and closes the file.
|
|
AppendAllLines ( string path, IEnumerable |
Appends lines to a file by using a specified encoding, and closes the file.
|
|
AppendAllText ( string path, string contents ) : void |
Appends the specified string to the file, and closes the file.
|
|
AppendAllText ( string path, string contents, |
Appends the specified string to the file, and closes the file.
|
|
AppendText ( string path ) : |
Creates a StreamWriter that appends UTF-8 encoded text to an existing file.
|
|
AppendText ( string path, |
Creates a StreamWriter that appends text to an existing file using the specified encoding.
|
|
BeginDownloadFile ( string path, Stream output ) : IAsyncResult |
Begins an asynchronous file downloading into the stream. Method calls made by this method to output, may under certain conditions result in exceptions thrown by the stream. |
|
BeginDownloadFile ( string path, Stream output, AsyncCallback asyncCallback ) : IAsyncResult |
Begins an asynchronous file downloading into the stream. Method calls made by this method to output, may under certain conditions result in exceptions thrown by the stream. |
|
BeginDownloadFile ( string path, Stream output, AsyncCallback asyncCallback, object state, Action |
Begins an asynchronous file downloading into the stream. Method calls made by this method to output, may under certain conditions result in exceptions thrown by the stream. |
|
BeginListDirectory ( string path, AsyncCallback asyncCallback, object state, Action |
Begins an asynchronous operation of retrieving list of files in remote directory.
|
|
BeginSynchronizeDirectories ( string sourcePath, string destinationPath, string searchPattern, AsyncCallback asyncCallback, object state ) : IAsyncResult |
Begins the synchronize directories.
|
|
BeginUploadFile ( Stream input, string path ) : IAsyncResult |
Begins an asynchronous uploading the stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. If the remote file already exists, it is overwritten and truncated. |
|
BeginUploadFile ( Stream input, string path, AsyncCallback asyncCallback ) : IAsyncResult |
Begins an asynchronous uploading the stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. If the remote file already exists, it is overwritten and truncated. |
|
BeginUploadFile ( Stream input, string path, AsyncCallback asyncCallback, object state, Action |
Begins an asynchronous uploading the stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. If the remote file already exists, it is overwritten and truncated. |
|
BeginUploadFile ( Stream input, string path, bool canOverride, AsyncCallback asyncCallback, object state, Action |
Begins an asynchronous uploading the stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. When path refers to an existing file, set canOverride to |
|
ChangeDirectory ( string path ) : void |
Changes remote directory to path.
|
|
ChangePermissions ( string path, short mode ) : void |
Changes permissions of file(s) to specified mode.
|
|
Create ( string path ) : |
Creates or overwrites a file in the specified path. If the target file already exists, it is first truncated to zero bytes. |
|
Create ( string path, int bufferSize ) : |
Creates or overwrites the specified file. If the target file already exists, it is first truncated to zero bytes. |
|
CreateDirectory ( string path ) : void |
Creates remote directory specified by path.
|
|
CreateText ( string path ) : |
Creates or opens a file for writing UTF-8 encoded text. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
CreateText ( string path, Encoding encoding ) : StreamWriter |
Creates or opens a file for writing text using the specified encoding. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
Delete ( string path ) : void |
Deletes the specified file or directory.
|
|
DeleteDirectory ( string path ) : void |
Deletes remote directory specified by path.
|
|
DeleteFile ( string path ) : void |
Deletes remote file specified by path.
|
|
DownloadFile ( string path, Stream output, Action |
Downloads remote file specified by the path into the stream. Method calls made by this method to output, may under certain conditions result in exceptions thrown by the stream. |
|
EndDownloadFile ( IAsyncResult asyncResult ) : void |
Ends an asynchronous file downloading into the stream.
|
|
EndListDirectory ( IAsyncResult asyncResult ) : IEnumerable |
Ends an asynchronous operation of retrieving list of files in remote directory.
|
|
EndSynchronizeDirectories ( IAsyncResult asyncResult ) : IEnumerable |
Ends the synchronize directories.
|
|
EndUploadFile ( IAsyncResult asyncResult ) : void |
Ends an asynchronous uploading the stream into remote file.
|
|
Exists ( string path ) : bool |
Checks whether file or directory exists;
|
|
Get ( string path ) : SftpFile |
Gets reference to remote file or directory.
|
|
GetAttributes ( string path ) : SftpFileAttributes |
Gets the SftpFileAttributes of the file on the path.
|
|
GetLastAccessTime ( string path ) : DateTime |
Returns the date and time the specified file or directory was last accessed.
|
|
GetLastAccessTimeUtc ( string path ) : DateTime |
Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last accessed.
|
|
GetLastWriteTime ( string path ) : DateTime |
Returns the date and time the specified file or directory was last written to.
|
|
GetLastWriteTimeUtc ( string path ) : DateTime |
Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.
|
|
GetStatus ( string path ) : SftpFileSytemInformation |
Gets status using [email protected] request.
|
|
ListDirectory ( string path, Action |
Retrieves list of files in remote directory.
|
|
Open ( string path, FileMode mode ) : SftpFileStream |
Opens a SftpFileStream on the specified path with read/write access.
|
|
Open ( string path, FileMode mode, FileAccess access ) : SftpFileStream |
Opens a SftpFileStream on the specified path, with the specified mode and access.
|
|
OpenRead ( string path ) : SftpFileStream |
Opens an existing file for reading.
|
|
OpenText ( string path ) : StreamReader |
Opens an existing UTF-8 encoded text file for reading.
|
|
OpenWrite ( string path ) : SftpFileStream |
Opens a file for writing. If the file does not exist, it is created. |
|
ReadAllBytes ( string path ) : byte[] |
Opens a binary file, reads the contents of the file into a byte array, and closes the file.
|
|
ReadAllLines ( string path ) : string[] |
Opens a text file, reads all lines of the file using UTF-8 encoding, and closes the file.
|
|
ReadAllLines ( string path, Encoding encoding ) : string[] |
Opens a file, reads all lines of the file with the specified encoding, and closes the file.
|
|
ReadAllText ( string path ) : string |
Opens a text file, reads all lines of the file with the UTF-8 encoding, and closes the file.
|
|
ReadAllText ( string path, Encoding encoding ) : string |
Opens a file, reads all lines of the file with the specified encoding, and closes the file.
|
|
ReadLines ( string path ) : IEnumerable |
Reads the lines of a file with the UTF-8 encoding.
|
|
ReadLines ( string path, Encoding encoding ) : IEnumerable |
Read the lines of a file that has a specified encoding.
|
|
RenameFile ( string oldPath, string newPath ) : void |
Renames remote file from old path to new path.
|
|
RenameFile ( string oldPath, string newPath, bool isPosix ) : void |
Renames remote file from old path to new path.
|
|
SetAttributes ( string path, SftpFileAttributes fileAttributes ) : void |
Sets the specified SftpFileAttributes of the file on the specified path.
|
|
SftpClient ( ConnectionInfo connectionInfo ) : System |
Initializes a new instance of the SftpClient class.
|
|
SftpClient ( string host, string username ) : System |
Initializes a new instance of the SftpClient class.
|
|
SftpClient ( string host, string username, string password ) : System |
Initializes a new instance of the SftpClient class.
|
|
SymbolicLink ( string path, string linkPath ) : void |
Creates a symbolic link from old path to new path.
|
|
SynchronizeDirectories ( string sourcePath, string destinationPath, string searchPattern ) : IEnumerable |
Synchronizes the directories.
|
|
UploadFile ( Stream input, string path, Action |
Uploads stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. |
|
UploadFile ( Stream input, string path, bool canOverride, Action |
Uploads stream into remote file. Method calls made by this method to input, may under certain conditions result in exceptions thrown by the stream. |
|
WriteAllBytes ( string path, byte bytes ) : void |
Writes the specified byte array to the specified file, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllLines ( string path, IEnumerable |
Writes a collection of strings to the file using the UTF-8 encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllLines ( string path, IEnumerable |
Writes a collection of strings to the file using the specified encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllLines ( string path, string contents ) : void |
Write the specified string array to the file using the UTF-8 encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllLines ( string path, string contents, Encoding encoding ) : void |
Writes the specified string array to the file by using the specified encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllText ( string path, string contents ) : void |
Writes the specified string to the file using the UTF-8 encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
|
WriteAllText ( string path, string contents, Encoding encoding ) : void |
Writes the specified string to the file using the specified encoding, and closes the file. If the target file already exists, it is overwritten. It is not first truncated to zero bytes. If the target file does not exist, it is created. |
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases unmanaged and - optionally - managed resources
|
|
OnConnected ( ) : void |
Called when client is connected to the server.
|
|
OnDisconnecting ( ) : void |
Called when client is disconnecting from the server.
|
Method | Description | |
---|---|---|
InternalDownloadFile ( string path, Stream output, SftpDownloadAsyncResult asyncResult, Action |
Internals the download file.
|
|
InternalListDirectory ( string path, Action |
Internals the list directory.
|
|
InternalSynchronizeDirectories ( string sourcePath, string destinationPath, string searchPattern, SftpSynchronizeDirectoriesAsyncResult asynchResult ) : IEnumerable |
||
InternalUploadFile ( Stream input, string path, Flags flags, SftpUploadAsyncResult asyncResult, Action |
Internals the upload file.
|
|
SetLastAccessTime ( string path, DateTime lastAccessTime ) : void | ||
SetLastAccessTimeUtc ( string path, DateTime lastAccessTimeUtc ) : void | ||
SetLastWriteTime ( string path, DateTime lastWriteTime ) : void | ||
SetLastWriteTimeUtc ( string path, DateTime lastWriteTimeUtc ) : void | ||
SftpClient ( ConnectionInfo connectionInfo, bool ownsConnectionInfo ) : System |
Initializes a new instance of the SftpClient class. If ownsConnectionInfo is |
|
SftpClient ( ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory ) : System |
Initializes a new instance of the SftpClient class. If ownsConnectionInfo is |
|
SftpClient ( string host, int port, string username ) : System | ||
SftpClient ( string host, int port, string username, string password ) : System |
public AppendAllLines ( string path, IEnumerable |
||
path | string | The file to append the lines to. The file is created if it does not already exist. |
contents | IEnumerable |
The lines to append to the file. |
return | void |
public AppendAllLines ( string path, IEnumerable |
||
path | string | The file to append the lines to. The file is created if it does not already exist. |
contents | IEnumerable |
The lines to append to the file. |
encoding | The character encoding to use. | |
return | void |
public AppendAllText ( string path, string contents ) : void | ||
path | string | The file to append the specified string to. |
contents | string | The string to append to the file. |
return | void |
public AppendAllText ( string path, string contents, |
||
path | string | The file to append the specified string to. |
contents | string | The string to append to the file. |
encoding | The character encoding to use. | |
return | void |
public AppendText ( string path ) : |
||
path | string | The path to the file to append to. |
return |
public AppendText ( string path, |
||
path | string | The path to the file to append to. |
encoding | The character encoding to use. | |
return |
public BeginDownloadFile ( string path, Stream output ) : IAsyncResult | ||
path | string | The path. |
output | Stream | The output. |
return | IAsyncResult |
public BeginDownloadFile ( string path, Stream output, AsyncCallback asyncCallback ) : IAsyncResult | ||
path | string | The path. |
output | Stream | The output. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
return | IAsyncResult |
public BeginDownloadFile ( string path, Stream output, AsyncCallback asyncCallback, object state, Action |
||
path | string | The path. |
output | Stream | The output. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
state | object | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
downloadCallback | Action |
The download callback. |
return | IAsyncResult |
public BeginListDirectory ( string path, AsyncCallback asyncCallback, object state, Action |
||
path | string | The path. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
state | object | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
listCallback | Action |
The list callback. |
return | IAsyncResult |
public BeginSynchronizeDirectories ( string sourcePath, string destinationPath, string searchPattern, AsyncCallback asyncCallback, object state ) : IAsyncResult | ||
sourcePath | string | The source path. |
destinationPath | string | The destination path. |
searchPattern | string | The search pattern. |
asyncCallback | AsyncCallback | The async callback. |
state | object | The state. |
return | IAsyncResult |
public BeginUploadFile ( Stream input, string path ) : IAsyncResult | ||
input | Stream | Data input stream. |
path | string | Remote file path. |
return | IAsyncResult |
public BeginUploadFile ( Stream input, string path, AsyncCallback asyncCallback ) : IAsyncResult | ||
input | Stream | Data input stream. |
path | string | Remote file path. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
return | IAsyncResult |
public BeginUploadFile ( Stream input, string path, AsyncCallback asyncCallback, object state, Action |
||
input | Stream | Data input stream. |
path | string | Remote file path. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
state | object | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
uploadCallback | Action |
The upload callback. |
return | IAsyncResult |
public BeginUploadFile ( Stream input, string path, bool canOverride, AsyncCallback asyncCallback, object state, Action |
||
input | Stream | Data input stream. |
path | string | Remote file path. |
canOverride | bool | Specified whether an existing file can be overwritten. |
asyncCallback | AsyncCallback | The method to be called when the asynchronous write operation is completed. |
state | object | A user-provided object that distinguishes this particular asynchronous write request from other requests. |
uploadCallback | Action |
The upload callback. |
return | IAsyncResult |
public ChangeDirectory ( string path ) : void | ||
path | string | New directory path. |
return | void |
public ChangePermissions ( string path, short mode ) : void | ||
path | string | File(s) path, may match multiple files. |
mode | short | The mode. |
return | void |
public Create ( string path ) : |
||
path | string | The path and name of the file to create. |
return |
public Create ( string path, int bufferSize ) : |
||
path | string | The path and name of the file to create. |
bufferSize | int | The maximum number of bytes buffered for reads and writes to the file. |
return |
public CreateDirectory ( string path ) : void | ||
path | string | Directory path to create. |
return | void |
public CreateText ( string path ) : |
||
path | string | The file to be opened for writing. |
return |
public CreateText ( string path, Encoding encoding ) : StreamWriter | ||
path | string | The file to be opened for writing. |
encoding | Encoding | The character encoding to use. |
return | StreamWriter |
public Delete ( string path ) : void | ||
path | string | The name of the file or directory to be deleted. Wildcard characters are not supported. |
return | void |
public DeleteDirectory ( string path ) : void | ||
path | string | Directory to be deleted path. |
return | void |
public DeleteFile ( string path ) : void | ||
path | string | File to be deleted path. |
return | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
return | void |
public DownloadFile ( string path, Stream output, Action |
||
path | string | File to download. |
output | Stream | Stream to write the file into. |
downloadCallback | Action |
The download callback. |
return | void |
public EndDownloadFile ( IAsyncResult asyncResult ) : void | ||
asyncResult | IAsyncResult | The pending asynchronous SFTP request. |
return | void |
public EndListDirectory ( IAsyncResult asyncResult ) : IEnumerable |
||
asyncResult | IAsyncResult | The pending asynchronous SFTP request. |
return | IEnumerable |
public EndSynchronizeDirectories ( IAsyncResult asyncResult ) : IEnumerable |
||
asyncResult | IAsyncResult | The async result. |
return | IEnumerable |
public EndUploadFile ( IAsyncResult asyncResult ) : void | ||
asyncResult | IAsyncResult | The pending asynchronous SFTP request. |
return | void |
public GetAttributes ( string path ) : SftpFileAttributes | ||
path | string | The path to the file. |
return | SftpFileAttributes |
public GetLastAccessTime ( string path ) : DateTime | ||
path | string | The file or directory for which to obtain access date and time information. |
return | DateTime |
public GetLastAccessTimeUtc ( string path ) : DateTime | ||
path | string | The file or directory for which to obtain access date and time information. |
return | DateTime |
public GetLastWriteTime ( string path ) : DateTime | ||
path | string | The file or directory for which to obtain write date and time information. |
return | DateTime |
public GetLastWriteTimeUtc ( string path ) : DateTime | ||
path | string | The file or directory for which to obtain write date and time information. |
return | DateTime |
public GetStatus ( string path ) : SftpFileSytemInformation | ||
path | string | The path. |
return | SftpFileSytemInformation |
public ListDirectory ( string path, Action |
||
path | string | The path. |
listCallback | Action |
The list callback. |
return | IEnumerable |
public Open ( string path, FileMode mode ) : SftpFileStream | ||
path | string | The file to open. |
mode | FileMode | A |
return | SftpFileStream |
public Open ( string path, FileMode mode, FileAccess access ) : SftpFileStream | ||
path | string | The file to open. |
mode | FileMode | A |
access | FileAccess | A |
return | SftpFileStream |
public OpenRead ( string path ) : SftpFileStream | ||
path | string | The file to be opened for reading. |
return | SftpFileStream |
public OpenText ( string path ) : StreamReader | ||
path | string | The file to be opened for reading. |
return | StreamReader |
public OpenWrite ( string path ) : SftpFileStream | ||
path | string | The file to be opened for writing. |
return | SftpFileStream |
public ReadAllBytes ( string path ) : byte[] | ||
path | string | The file to open for reading. |
return | byte[] |
public ReadAllLines ( string path ) : string[] | ||
path | string | The file to open for reading. |
return | string[] |
public ReadAllLines ( string path, Encoding encoding ) : string[] | ||
path | string | The file to open for reading. |
encoding | Encoding | The encoding applied to the contents of the file. |
return | string[] |
public ReadAllText ( string path ) : string | ||
path | string | The file to open for reading. |
return | string |
public ReadAllText ( string path, Encoding encoding ) : string | ||
path | string | The file to open for reading. |
encoding | Encoding | The encoding applied to the contents of the file. |
return | string |
public ReadLines ( string path ) : IEnumerable |
||
path | string | The file to read. |
return | IEnumerable |
public ReadLines ( string path, Encoding encoding ) : IEnumerable |
||
path | string | The file to read. |
encoding | Encoding | The encoding that is applied to the contents of the file. |
return | IEnumerable |
public RenameFile ( string oldPath, string newPath ) : void | ||
oldPath | string | Path to the old file location. |
newPath | string | Path to the new file location. |
return | void |
public RenameFile ( string oldPath, string newPath, bool isPosix ) : void | ||
oldPath | string | Path to the old file location. |
newPath | string | Path to the new file location. |
isPosix | bool | if set to |
return | void |
public SetAttributes ( string path, SftpFileAttributes fileAttributes ) : void | ||
path | string | The path to the file. |
fileAttributes | SftpFileAttributes | The desired |
return | void |
public SftpClient ( ConnectionInfo connectionInfo ) : System | ||
connectionInfo | ConnectionInfo | The connection info. |
return | System |
public SftpClient ( string host, string username ) : System | ||
host | string | Connection host. |
username | string | Authentication username. |
return | System |
public SftpClient ( string host, string username, string password ) : System | ||
host | string | Connection host. |
username | string | Authentication username. |
password | string | Authentication password. |
return | System |
public SymbolicLink ( string path, string linkPath ) : void | ||
path | string | The old path. |
linkPath | string | The new path. |
return | void |
public SynchronizeDirectories ( string sourcePath, string destinationPath, string searchPattern ) : IEnumerable |
||
sourcePath | string | The source path. |
destinationPath | string | The destination path. |
searchPattern | string | The search pattern. |
return | IEnumerable |
public UploadFile ( Stream input, string path, Action |
||
input | Stream | Data input stream. |
path | string | Remote file path. |
uploadCallback | Action |
The upload callback. |
return | void |
public UploadFile ( Stream input, string path, bool canOverride, Action |
||
input | Stream | Data input stream. |
path | string | Remote file path. |
canOverride | bool | if set to |
uploadCallback | Action |
The upload callback. |
return | void |
public WriteAllBytes ( string path, byte bytes ) : void | ||
path | string | The file to write to. |
bytes | byte | The bytes to write to the file. |
return | void |
public WriteAllLines ( string path, IEnumerable |
||
path | string | The file to write to. |
contents | IEnumerable |
The lines to write to the file. |
return | void |
public WriteAllLines ( string path, IEnumerable |
||
path | string | The file to write to. |
contents | IEnumerable |
The lines to write to the file. |
encoding | Encoding | The character encoding to use. |
return | void |
public WriteAllLines ( string path, string contents ) : void | ||
path | string | The file to write to. |
contents | string | The string array to write to the file. |
return | void |
public WriteAllLines ( string path, string contents, Encoding encoding ) : void | ||
path | string | The file to write to. |
contents | string | The string array to write to the file. |
encoding | Encoding | An |
return | void |
public WriteAllText ( string path, string contents ) : void | ||
path | string | The file to write to. |
contents | string | The string to write to the file. |
return | void |
public WriteAllText ( string path, string contents, Encoding encoding ) : void | ||
path | string | The file to write to. |
contents | string | The string to write to the file. |
encoding | Encoding | The encoding to apply to the string. |
return | void |