The FtpClient type exposes the following members.
Methods
Name | Description | |
---|---|---|
Authenticate |
Performs a login on the server. This method is overridable so
that the login procedure can be changed to support, for example,
a FTP proxy.
|
|
BeginConnect |
Initiates a connection to the server
|
|
BeginCreateDirectory(String, AsyncCallback, Object) |
Creates a directory asynchronously
|
|
BeginCreateDirectory(String, Boolean, AsyncCallback, Object) |
Creates a directory asynchronously
|
|
BeginDeleteDirectory(String, AsyncCallback, Object) |
Asynchronously removes a directory from the server
|
|
BeginDeleteDirectory(String, Boolean, AsyncCallback, Object) |
Asynchronously removes a directory from the server
|
|
BeginDeleteDirectory(String, Boolean, FtpListOption, AsyncCallback, Object) |
Asynchronously removes a directory from the server
|
|
BeginDeleteFile |
Asynchronously deletes a file from the server
|
|
BeginDereferenceLink(FtpListItem, AsyncCallback, Object) |
Derefence a FtpListItem object asynchronously. See the
MaximumDereferenceCount property for controlling
how deep this method will recurse before giving up.
|
|
BeginDereferenceLink(FtpListItem, Int32, AsyncCallback, Object) |
Derefence a FtpListItem object asynchronously
|
|
BeginDirectoryExists |
Checks if a directory exists on the server asynchronously.
|
|
BeginDisconnect |
Initiates a disconnection on the server
|
|
BeginExecute |
Performs an asynchronouse execution of the specified command
|
|
BeginFileExists(String, AsyncCallback, Object) |
Checks if a file exsts on the server by taking a
file listing of the parent directory in the path
and comparing the results the path supplied.
|
|
BeginFileExists(String, FtpListOption, AsyncCallback, Object) |
Checks if a file exsts on the server by taking a
file listing of the parent directory in the path
and comparing the results the path supplied.
|
|
BeginGetFileSize |
Asynchronously retrieve the size of the specified file
|
|
BeginGetHash |
Asynchronously retrieves the hash for the specified file
|
|
BeginGetHashAlgorithm |
Asynchronously get the hash algorithm being used by the HASH command.
|
|
BeginGetListing(AsyncCallback, Object) |
Gets a file listing from the server asynchronously
|
|
BeginGetListing(String, AsyncCallback, Object) |
Gets a file listing from the server asynchronously
|
|
BeginGetListing(String, FtpListOption, AsyncCallback, Object) |
Gets a file listing from the server asynchronously
|
|
BeginGetModifiedTime |
Gets the modified time of the file
|
|
BeginGetNameListing(AsyncCallback, Object) |
Asynchronously gets a list of file and directory names for the specified path.
|
|
BeginGetNameListing(String, AsyncCallback, Object) |
Asynchronously gets a list of file and directory names for the specified path.
|
|
BeginGetWorkingDirectory |
Asynchronously retrieves the working directory
|
|
BeginOpenAppend(String, AsyncCallback, Object) |
Opens the specified file for writing
|
|
BeginOpenAppend(String, FtpDataType, AsyncCallback, Object) |
Opens the specified file for writing
|
|
BeginOpenRead(String, AsyncCallback, Object) |
Opens the specified file for reading
|
|
BeginOpenRead(String, Int64, AsyncCallback, Object) |
Opens the specified file for reading
|
|
BeginOpenRead(String, FtpDataType, AsyncCallback, Object) |
Opens the specified file for reading
|
|
BeginOpenRead(String, FtpDataType, Int64, AsyncCallback, Object) |
Opens the specified file for reading
|
|
BeginOpenWrite(String, AsyncCallback, Object) |
Opens the specified file for writing
|
|
BeginOpenWrite(String, FtpDataType, AsyncCallback, Object) |
Opens the specified file for writing
|
|
BeginRename |
Asynchronously renames an object on the server
|
|
BeginSetDataType |
Asynchronously sets the data type on the server
|
|
BeginSetHashAlgorithm |
Asynchronously sets the hash algorithm type to be used with the HASH command.
|
|
BeginSetWorkingDirectory |
Asynchronously changes the working directory on the server
|
|
Connect()()()() |
Connect to the server. Throws ObjectDisposedException if this object has been disposed.
|
|
Connect(Uri) |
Connects to the specified URI. If the path specified by the URI ends with a
/ then the working directory is changed to the path specified.
|
|
Connect(Uri, Boolean) |
Connects to the specified URI. If the path specified by the URI ends with a
/ then the working directory is changed to the path specified.
|
|
CreateDirectory(String) |
Creates a directory on the server. If the preceding
directories do not exist they are created.
|
|
CreateDirectory(String, Boolean) |
Creates a directory on the server
|
|
DeleteDirectory(String) |
Deletes the specified directory on the server.
|
|
DeleteDirectory(String, Boolean) |
Delets the specified directory on the server
|
|
DeleteDirectory(String, Boolean, FtpListOption) |
Deletes the specified directory on the server
|
|
DeleteFile |
Deletes a file on the server
|
|
DereferenceLink(FtpListItem) |
Recursively dereferences a symbolic link. See the
MaximumDereferenceCount property for controlling
how deep this method will recurse before giving up.
|
|
DereferenceLink(FtpListItem, Int32) |
Recursively dereferences a symbolic link
|
|
DirectoryExists |
Tests if the specified directory exists on the server. This
method works by trying to change the working directory to
the path specified. If it succeeds, the directory is changed
back to the old working directory and true is returned. False
is returned otherwise and since the CWD failed it is assumed
the working directory is still the same.
|
|
DisableUTF8 |
Disables UTF8 support and changes the Encoding property
back to ASCII. If the server returns an error when trying
to turn UTF8 off a FtpCommandException will be thrown.
|
|
Disconnect |
Disconnect from the server
|
|
Dispose |
Disconnects from the server, releases resources held by this
object.
|
|
EndConnect |
Ends an asynchronous connection attempt to the server
|
|
EndCreateDirectory |
Ends a call to BeginCreateDirectory
|
|
EndDeleteDirectory |
Ends a call to BeginDeleteDirectory()
|
|
EndDeleteFile |
Ends a call to BeginDeleteFile
|
|
EndDereferenceLink |
Ends a call to BeginDereferenceLink
|
|
EndDirectoryExists |
Ends a call to BeginDirectoryExists
|
|
EndDisconnect |
Ends a call to BeginDisconnect
|
|
EndExecute |
Ends an asynchronous command
|
|
EndFileExists |
Ends a call to BeginFileExists
|
|
EndGetFileSize |
Ends a call to BeginGetFileSize()
|
|
EndGetHash |
Ends an asynchronous call to BeginGetHash
|
|
EndGetHashAlgorithm |
Ends a call to BeginGetHashAlgorithm
|
|
EndGetListing |
Ends an asynchronous file listing
|
|
EndGetModifiedTime |
Ends a call to BeginGetModifiedTime()
|
|
EndGetNameListing |
Ends a call to BeginGetNameListing()
|
|
EndGetWorkingDirectory |
Ends an asynchronous call to retrieve the working directory
|
|
EndOpenAppend |
Ends a call to BeginOpenAppend()
|
|
EndOpenRead |
Ends a call to BeginOpenRead()
|
|
EndOpenWrite |
Ends a call to BeginOpenWrite()
|
|
EndRename |
Ends a call to BeginRename
|
|
EndSetDataType |
Ends a call to BeginSetDataType()
|
|
EndSetHashAlgorithm |
Ends an asynchronous call to BeginSetHashAlgorithm
|
|
EndSetWorkingDirectory |
Ends asynchronous directory change
|
|
Equals | (Inherited from Object.) | |
Execute(String) |
Executes a command
|
|
Execute(String, array<Object>[]()[][]) |
Executes a command
|
|
FileExists(String) |
Checks if a file exsts on the server by taking a
file listing of the parent directory in the path
and comparing the results the path supplied.
|
|
FileExists(String, FtpListOption) |
Checks if a file exsts on the server by taking a
file listing of the parent directory in the path
and comparing the results the path supplied.
|
|
Finalize |
Finalizer
(Overrides Object..::..Finalize()()()().) |
|
GetAsyncDelegate<(Of <<'(T>)>>) |
Retretieves the delegate for the specified IAsyncResult and removes
it from the m_asyncmethods collection if the operation is successfull
|
|
GetFeatures |
Populates the capabilities flags based on capabilities
supported by this server. This method is overridable
so that new features can be supported
|
|
GetFileSize |
Gets the size of the file
|
|
GetHash |
Gets the hash of an object on the server using the
currently selected hash algorithm. Supported
algorithms, if any, are available in the HashAlgorithms
property. You should confirm that it's not equal
to FtpHashAlgorithm.NONE before calling this method
otherwise the server trigger a FtpCommandException()
due to a lack of support for the HASH command. You can
set the algorithm using the SetHashAlgorithm() method and
you can query the server for the current hash algorithm
using the GetHashAlgorithm() method.
This feature is experimental and based on the following draft:
http://tools.ietf.org/html/draft-bryan-ftpext-hash-02
|
|
GetHashAlgorithm |
Gets the currently selected hash algorith for the HASH
command. This feature is experimental. See this link
for details:
http://tools.ietf.org/html/draft-bryan-ftpext-hash-02
|
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetListing()()()() |
Gets a file listing from the server. Each FtpListItem object returned
contains information about the file that was able to be retrieved. If
a DateTime property is equal to DateTime.MinValue then it means the
date in question was not able to be retrieved. If the Size property
is equal to 0 then it means the size of the object could also not
be retrieved.
|
|
GetListing(String) |
Gets a file listing from the server. Each FtpListItem object returned
contains information about the file that was able to be retrieved. If
a DateTime property is equal to DateTime.MinValue then it means the
date in question was not able to be retrieved. If the Size property
is equal to 0 then it means the size of the object could also not
be retrieved.
|
|
GetListing(String, FtpListOption) |
Gets a file listing from the server. Each FtpListItem object returned
contains information about the file that was able to be retrieved. If
a DateTime property is equal to DateTime.MinValue then it means the
date in question was not able to be retrieved. If the Size property
is equal to 0 then it means the size of the object could also not
be retrieved.
|
|
GetModifiedTime |
Gets the modified time of the file
|
|
GetNameListing()()()() |
Returns a file/directory listing using the NLST command.
|
|
GetNameListing(String) |
Returns a file/directory listing using the NLST command.
|
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
GetWorkingDirectory |
Gets the current working directory
|
|
HasFeature |
Performs a bitwise and to check if the specified
flag is set on the Capabilities enum property.
|
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
OpenAppend(String) |
Opens the specified file to be appended to
|
|
OpenAppend(Uri) |
Opens a stream to the file specified by the URI
|
|
OpenAppend(String, FtpDataType) |
Opens the specified file to be appended to
|
|
OpenAppend(Uri, Boolean) |
Opens a stream to the file specified by the URI
|
|
OpenAppend(Uri, Boolean, FtpDataType) |
Opens a stream to the file specified by the URI
|
|
OpenRead(String) |
Opens the specified file for reading
|
|
OpenRead(Uri) |
Opens a stream to the file specified by the URI
|
|
OpenRead(String, Int64) |
Opens the specified file for reading
|
|
OpenRead(String, FtpDataType) |
Opens the specified file for reading
|
|
OpenRead(Uri, Boolean) |
Opens a stream to the file specified by the URI
|
|
OpenRead(String, FtpDataType, Int64) |
Opens the specified file for reading
|
|
OpenRead(Uri, Boolean, FtpDataType) |
Opens a stream to the file specified by the URI
|
|
OpenRead(Uri, Boolean, FtpDataType, Int64) |
Opens a stream to the file specified by the URI
|
|
OpenWrite(String) |
Opens the specified file for writing
|
|
OpenWrite(Uri) |
Opens a stream to the file specified by the URI
|
|
OpenWrite(String, FtpDataType) |
Opens the specified file for writing
|
|
OpenWrite(Uri, Boolean) |
Opens a stream to the file specified by the URI
|
|
OpenWrite(Uri, Boolean, FtpDataType) |
Opens a stream to the file specified by the URI
|
|
Rename |
Renames an object on the remote file system.
|
|
SetDataType |
Sets the data type of information sent over the data stream
|
|
SetHashAlgorithm |
Tells the server which hash algorith to use
for the HASH command. If you specifiy an
algorithm not listed in FtpClient.HashTypes
a NotImplemented() exectpion will be thrown
so be sure to query that list of Flags before
selecting a hash algorithm. Support for the
HASH command is experimental. Please see
the following link for more details:
http://tools.ietf.org/html/draft-bryan-ftpext-hash-02
|
|
SetWorkingDirectory |
Sets the work directory on the server
|
|
ToString | (Inherited from Object.) |
Extension Methods
Name | Description | |
---|---|---|
BeginGetChecksum |
Asynchronusly retrieve a checksum of the specified file. This feature
is non-standard.
(Defined by ChecksumExtension.) |
|
BeginGetMD5 |
Asynchronusly retrieve a MD5 hash. The MD5 command is non-standard
and not guaranteed to work.
(Defined by MD5.) |
|
BeginGetXCRC |
Asynchronusly retrieve a CRC hash. The XCRC command is non-standard
and not guaranteed to work.
(Defined by XCRC.) |
|
BeginGetXMD5 |
Asynchronusly retrieve a MD5 hash. The XMD5 command is non-standard
and not guaranteed to work.
(Defined by XMD5.) |
|
BeginGetXSHA1 |
Asynchronusly retrieve a SHA1 hash. The XSHA1 command is non-standard
and not guaranteed to work.
(Defined by XSHA1.) |
|
BeginGetXSHA256 |
Asynchronusly retrieve a SHA256 hash. The XSHA256 command is non-standard
and not guaranteed to work.
(Defined by XSHA256.) |
|
BeginGetXSHA512 |
Asynchronusly retrieve a SHA512 hash. The XSHA512 command is non-standard
and not guaranteed to work.
(Defined by XSHA512.) |
|
GetChecksum |
Retrieves a checksum of the given file using a checksumming method
that the server supports, if any. The algorithm used goes in this order:
1. HASH command; server preferred algorithm. See FtpClient.SetHashAlgorithm()
2. MD5 / XMD5 commands
3. XSHA1 command
4. XSHA256 command
5. XSHA512 command
6. XCRC command
(Defined by ChecksumExtension.) |
|
GetMD5 |
Gets the MD5 hash of the specified file using MD5. This is a non-standard extension
to the protocol and may or may not work. A FtpCommandException will be
thrown if the command fails.
(Defined by MD5.) |
|
GetXCRC |
Get the CRC value of the specified file. This is a non-standard extension of the protocol
and may throw a FtpCommandException if the server does not support it.
(Defined by XCRC.) |
|
GetXMD5 |
Gets the MD5 hash of the specified file using XMD5. This is a non-standard extension
to the protocol and may or may not work. A FtpCommandException will be
thrown if the command fails.
(Defined by XMD5.) |
|
GetXSHA1 |
Gets the SHA-1 hash of the specified file using XSHA1. This is a non-standard extension
to the protocol and may or may not work. A FtpCommandException will be
thrown if the command fails.
(Defined by XSHA1.) |
|
GetXSHA256 |
Gets the SHA-256 hash of the specified file using XSHA256. This is a non-standard extension
to the protocol and may or may not work. A FtpCommandException will be
thrown if the command fails.
(Defined by XSHA256.) |
|
GetXSHA512 |
Gets the SHA-512 hash of the specified file using XSHA512. This is a non-standard extension
to the protocol and may or may not work. A FtpCommandException will be
thrown if the command fails.
(Defined by XSHA512.) |