TFtpConnection Class Reference

Provides a wrapper for the FTP connection. More...

List of all members.

Public Member Functions

 Abort ()
 Cancel the current transfer.
Boolean Connect (const WideString RemoteDir)
 Connect to FTP server.
Boolean Connected ()
 Check if a connection is open.
Boolean SupportsVerification ()
 Indicates if the FTP server supports one of the extensibility features for verified transfer integrity.
Boolean PutFile (const WideString LocalFile, const WideString RemoteFile)
 Transfer a local file to the FTP server.
Boolean GetFile (const WideString RemoteFile, const WideString LocalFile, const Integer RemoteFilesize)
 Transfer a file from the FTP server to the local system.
Boolean SetCurrentDirectory (const WideString RemoteDir)
 Set the current directory on the FTP server.
WideString GetCurrentDirectory ()
 Get the current directory on the FTP server.
Boolean DeleteFile (const WideString Filename)
 Delete a file on the FTP server.
Boolean CreateDirectory (const WideString DirName)
 Create a directory on the FTP server.
Boolean RemoveDirectory (const WideString Filename)
 Remove a directory on the FTP server.
Boolean RenameFile (const WideString OldFile, const WideString Newfile)
 Rename a file on the FTP server.
 ShowLastResponseInfo ()
 Display FTP server error message.
 Disconnect ()
 Disconnect from the FTP server.

Public Attributes

TIdFTP IdFTP
 The Indy FTP client component.
TLogger Logger
 The logger object.

Protected Attributes

Boolean UsingUtf8


Detailed Description

Provides a wrapper for the FTP connection.


Member Function Documentation

TFtpConnection::Abort  ) 
 

Cancel the current transfer.

Abort is a procedure that instructs the FTP server to interrupt the previous FTP service command, and any associated transfer of data. Abort does not affect the control connection for the FTP client, but forces the data connection to be closed.

Boolean TFtpConnection::Connect const WideString  RemoteDir  ) 
 

Connect to FTP server.

Parameters:
RemoteDir The name of the initial remote directory.
Returns:
True if the connection has been opened.

TFtpConnection::Connected  ) 
 

Check if a connection is open.

Returns:
True if a FTP connection is open

Boolean TFtpConnection::CreateDirectory const WideString  DirName  ) 
 

Create a directory on the FTP server.

Parameters:
DirName Name of the new directory.
Returns:
True if the directory has been created.

Boolean TFtpConnection::DeleteFile const WideString  Filename  ) 
 

Delete a file on the FTP server.

Parameters:
Filename The name of the file.
Returns:
True if the file has been deleted.

WideString TFtpConnection::GetCurrentDirectory  ) 
 

Get the current directory on the FTP server.

Returns:
The current FTP server directory

Boolean TFtpConnection::GetFile const WideString  RemoteFile,
const WideString  LocalFile,
const Integer  RemoteFilesize
 

Transfer a file from the FTP server to the local system.

Parameters:
RemoteFile 
LocalFile 
RemoteFilesize 
Returns:
True if the download was successful.

Boolean TFtpConnection::PutFile const WideString  LocalFile,
const WideString  RemoteFile
 

Transfer a local file to the FTP server.

Parameters:
LocalFile local filename.
RemoteFile remote filename.
Returns:
True if the transfer was successful.

Boolean TFtpConnection::RemoveDirectory const WideString  Filename  ) 
 

Remove a directory on the FTP server.

Parameters:
Filename Name of the file to be deleted.
Returns:
True if the directory has been deleted.

Boolean TFtpConnection::RenameFile const WideString  OldFile,
const WideString  Newfile
 

Rename a file on the FTP server.

Parameters:
OldFile Name of the file to be renamed.
Newfile New file name.
Returns:
True if the file has been renamed.

Boolean TFtpConnection::SetCurrentDirectory const WideString  RemoteDir  ) 
 

Set the current directory on the FTP server.

Parameters:
RemoteDir The name of the directory.
Returns:
True if the directory change was successful.

Boolean TFtpConnection::SupportsVerification  ) 
 

Indicates if the FTP server supports one of the extensibility features for verified transfer integrity.

Returns:
True when one of the checksum algorithms is listed in the Capabilities for the FTP server.


Member Data Documentation

TFtpConnection::IdFTP
 

The Indy FTP client component.

See also:
GetIdFTP For reading

SetIdFTP For writing

TFtpConnection::Logger
 

The logger object.

See also:
GetLogger For reading

SetLogger For writing

Boolean TFtpConnection::UsingUtf8 [protected]
 

See also:
GetUsingUtf8 For reading

SetUsingUtf8 For writing


Generated by doxygen - Project hosted on  SourceForge.net Logo