The FTPClient type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FTPClient()()()() | Constructs an FTPClient. | |
FTPClient(IPAddress) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. | |
FTPClient(String) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. | |
FTPClient(IPAddress, Int32) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. | |
FTPClient(String, Int32) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. | |
FTPClient(IPAddress, Int32, Int32) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. | |
FTPClient(String, Int32, Int32) | Obsolete. Constructs an FTPClient instance and connects to the FTP server. |
Methods
Name | Description | |
---|---|---|
Abort | Abort the current action. | |
Account |
Supply account information string to the server.
| |
CancelResume |
Cancel the resume. Use this method if something goes wrong
and the server is left in an inconsistent state
| |
CancelTransfer | Cancels the current transfer. | |
CdUp | Change the remote working directory to the parent directory. | |
ChDir | Change the remote working directory to that supplied. | |
CloseDataSocket(Stream) | ||
CloseDataSocket(StreamReader) | ||
CloseDataSocket(StreamWriter) | ||
Connect | Connect to the FTP server. | |
DebugResponses | Switch debug of responses on or off | |
Delete | Delete the specified remote file. | |
Dir()()()() |
List current directory's contents as an array of strings of
filenames.
| |
Dir(String) |
List a directory's contents as an array of strings of filenames.
| |
Dir(String, Boolean) |
List a directory's contents as an array of strings.
| |
DirDetails()()()() |
List the current directory's contents as an array of FTPFile objects.
| |
DirDetails(String) |
List a directory's contents as an array of FTPFile objects.
| |
DirDetails(String, FTPFileCallback) |
List a directory's contents as an array of FTPFile objects.
| |
Equals | (Inherited from Object.) | |
Exists |
Checks for the existence of a file on the server.
| |
Features | Get the server supplied features. | |
Finalize | (Inherited from Object.) | |
Get(String) | Get data from the FTP server. | |
Get(Stream, String) |
Get data from the FTP server, using the currently
set transfer mode.
| |
Get(String, String) |
Get data from the FTP server using the currently
set transfer mode.
| |
GetHashCode | (Inherited from Object.) | |
GetInputStream | ||
GetOutputStream | ||
GetSystem | Get the type of the OS at the server. | |
GetType | (Inherited from Object.) | |
Help | Get the help text for the specified command
| |
KillControlChannel | ||
Login | Login into an account on the FTP server using the user-name and password provided. | |
MemberwiseClone | (Inherited from Object.) | |
MkDir | Create the specified remote working directory. | |
ModTime | Get modification time for a remote file. | |
NoOperation |
Send a "no operation" message that does nothing, which can
be called periodically to prevent the connection timing out.
| |
Password |
Supplies the password for a previously supplied
user-name to log into the FTP server. Must be
preceeded by the User(String) method
| |
Put(array<Byte>[]()[][], String) |
Put data onto the FTP server in the current directory.
| |
Put(Stream, String) |
Put a stream of data onto the FTP server in the current directory.
| |
Put(String, String) |
Put a local file onto the FTP server in the current directory.
| |
Put(array<Byte>[]()[][], String, Boolean) |
Put data onto the FTP server in the current directory. Allows
appending if current file exists.
| |
Put(Stream, String, Boolean) |
Put a stream of data onto the FTP server in the current directory. Allows appending
if current file exists
| |
Put(String, String, Boolean) |
Put a local file onto the FTP server in the current directory. Allows appending
if current file exists.
| |
Pwd | Get the current remote working directory. | |
Quit | Quit the FTP session by sending a QUIT command before closing the socket. | |
QuitImmediately |
Quit the FTP session immediately by closing the control socket
without sending the QUIT command.
| |
Quote | Issue arbitrary ftp commands to the FTP server. | |
Rename | Rename a file or directory. | |
Restart | Set the REST marker so that the next transfer doesn't start at the beginning of the remote file | |
Resume | Make the next file transfer (put or get) resume. | |
ResumeDownload | Make the next download resume at a specific point. | |
RmDir | Delete the specified remote working directory. | |
SetModTime | Sets the modification time of a remote file. | |
Site | Run a site-specific command on the server. | |
Size |
Get the size of a remote file.
| |
TestConnection |
Tests the connection
| |
ToString | (Inherited from Object.) | |
User |
Supply the user-name to log into an account on the FTP server.
Must be followed by the Password(String) method.
Note that Connect()()()() must be called first.
| |
ValidateTransfer | Validate that the Put() or get() was successful. | |
ValidateTransferOnError |
Validate a transfer when an error has occurred on the data channel.
Set a very short transfer in case things have hung. Set it back
at the end.
|
Fields
Name | Description | |
---|---|---|
logTag | Logging tag | |
noOperationInterval |
Interval for NOOP calls during large transfers in seconds
| |
throttler |
Threshold for throttling
|
Properties
Name | Description | |
---|---|---|
ActiveIPAddress |
Force the PORT command to send a fixed IP address, used only for
certain firewalls
| |
ActivePortRange |
Port range for active mode, used only if it is
necessary to limit the ports to a narrow range specified
in a firewall
| |
AutoPassiveIPSubstitution |
Use AutoPassiveIPSubstitution to ensure that
data-socket connections are made to the same IP address
that the control socket is connected to.
| |
BuildTimestamp | The edtFTPj build timestamp. | |
CloseStreamsAfterTransfer |
If true then streams are closed after a transfer has completed.
| |
Connected |
Is the client currently connected?
| |
ConnectMode |
The connection-mode (passive or active) of data-channels.
| |
ControlEncoding |
The encoding to use when dealing with file and directory paths.
| |
ControlPort |
The port on the server to which to connect the control-channel.
| |
DataEncoding |
The encoding to use for data when transferring in ASCII mode.
| |
DeleteOnFailure |
Controls whether or not a file is deleted when a failure occurs.
| |
DirectoryEmptyMessages |
Holds fragments of server messages that indicate a directory
is empty
| |
FileNotFoundMessages |
Holds fragments of server messages that indicate a file was not found
| |
FTPFileFactory |
Override the chosen file factory with a user created one - meaning
that a specific parser has been selected.
| |
IsConnected |
Indicates whether the client is currently connected with the server.
| |
IsResuming |
Returns true if the next transfer is to be resumed (i.e. Resume()()()() has been called).
| |
LastBytesTransferred |
The number of bytes transferred in the last transfer operation.
| |
LastFileTransferred |
The remote name/path of the last file transferred.
| |
LastValidReply | The latest valid reply from the server. | |
LogTag | Log tag | |
ParsingCulture | The culture for parsing file listings. | |
RemoteHost |
The domain-name or IP address of the FTP server.
| |
ServerWakeupInterval |
The interval in seconds that the server is sent a wakeup message during
large transfers.
| |
ShowHiddenFiles |
Include hidden files in operations that involve listing of directories,
and if supported by the server.
| |
StrictReturnCodes | Controls whether or not checking of return codes is strict. | |
SynchronizePassiveConnections |
For cases where your FTP server does not properly manage PASV connections,
it may be necessary to synchronize the creation of passive data sockets.
It has been reported that some FTP servers (such as those at Akamai)
appear to get confused when multiple FTP clients from the same IP address
attempt to connect at the same time. The default value for
SynchronizePassiveConnections is false.
| |
TimeDifference |
Time difference between server and client (relative to client).
| |
TimeIncludesSeconds |
Indicates whether seconds were included in the most recent directoy listing.
| |
Timeout |
TCP timeout on the underlying sockets, in milliseconds.
| |
TransferBufferSize |
The size of the buffers (in bytes) used in writing to and reading from the data-sockets.
| |
TransferCompleteMessages |
Holds fragments of server messages that indicate a transfer completed.
| |
TransferNotifyInterval |
The number of bytes transferred between each notification of the
BytesTransferred event.
| |
TransferNotifyListings |
By default the BytesTransferred event is not triggered during directory
listings - this property can be used to enable this behaviour.
| |
TransferType | The current file transfer type (BINARY or ASCII). | |
Version | The version of edtFTPj. | |
WelcomeMessage |
Server welcome message.
|
Events
Name | Description | |
---|---|---|
BytesTransferred |
Event triggered every time TransferNotifyInterval bytes transferred.
| |
CommandError |
Occurs when there is an error while a command was being sent or
a reply was being received.
| |
CommandSent |
Triggered every time a command is sent to the server.
| |
ReplyReceived |
Triggered every time a reply is received from the server.
| |
TransferComplete | Obsolete.
Notifies of the completion of a transfer.
| |
TransferCompleteEx |
Notifies of the completion of a transfer, and supplies more details than TransferComplete | |
TransferStarted | Obsolete.
Notifies of the start of a transfer.
| |
TransferStartedEx |
Notifies of the start of a transfer, and supplies more details than TransferStarted |