BTVisualFTP 3.0

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 string 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 string LocalFile, const string RemoteFile)
 Transfer a local file to the FTP server.
Boolean GetFile (const string RemoteFile, const string LocalFile, const Integer RemoteFilesize)
 Transfer a file from the FTP server to the local system.
Boolean SetCurrentDirectory (const string RemoteDir)
 Set the current directory on the FTP server.
string GetCurrentDirectory ()
 Get the current directory on the FTP server.
Boolean DeleteFile (const string Filename)
 Delete a file on the FTP server.
Boolean CreateDirectory (const string DirName)
 Create a directory on the FTP server.
Boolean RemoveDirectory (const string Filename)
 Remove a directory on the FTP server.
Boolean RenameFile (const string OldFile, const string 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.

Referenced by Connect().

Boolean TFtpConnection::Connect ( const string  RemoteDir)

Connect to FTP server.

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

References Abort(), Connected(), CreateDirectory(), DeleteFile(), Disconnect(), TLogger::Error(), GetCurrentDirectory(), GetFile(), IdFTP, TLogger::Info(), Logger, PutFile(), RemoveDirectory(), RenameFile(), SetCurrentDirectory(), ShowLastResponseInfo(), SupportsVerification(), UsingUtf8, and TLogger::Warn().

TFtpConnection::Connected ( )

Check if a connection is open.

Returns:
True if a FTP connection is open

References IdFTP.

Referenced by Connect().

Boolean TFtpConnection::CreateDirectory ( const string  DirName)

Create a directory on the FTP server.

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

Referenced by Connect().

Boolean TFtpConnection::DeleteFile ( const string  Filename)

Delete a file on the FTP server.

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

Referenced by Connect().

string TFtpConnection::GetCurrentDirectory ( )

Get the current directory on the FTP server.

Returns:
The current FTP server directory

Referenced by Connect().

Boolean TFtpConnection::GetFile ( const string  RemoteFile,
const string  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.

Referenced by Connect().

Boolean TFtpConnection::PutFile ( const string  LocalFile,
const string  RemoteFile 
)

Transfer a local file to the FTP server.

Parameters:
LocalFilelocal filename.
RemoteFileremote filename.
Returns:
True if the transfer was successful.

Referenced by Connect().

Boolean TFtpConnection::RemoveDirectory ( const string  Filename)

Remove a directory on the FTP server.

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

Referenced by Connect().

Boolean TFtpConnection::RenameFile ( const string  OldFile,
const string  Newfile 
)

Rename a file on the FTP server.

Parameters:
OldFileName of the file to be renamed.
NewfileNew file name.
Returns:
True if the file has been renamed.

Referenced by Connect().

Boolean TFtpConnection::SetCurrentDirectory ( const string  RemoteDir)

Set the current directory on the FTP server.

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

Referenced by Connect().

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.

Referenced by Connect().


Member Data Documentation

The Indy FTP client component.

See also:
GetIdFTP For reading
SetIdFTP For writing

Referenced by Connect(), and Connected().

The logger object.

See also:
GetLogger For reading
SetLogger For writing

Referenced by Connect().

Boolean TFtpConnection::UsingUtf8 [protected]
See also:
GetUsingUtf8 For reading
SetUsingUtf8 For writing

Referenced by Connect().

 All Classes Files Functions Variables Typedefs Enumerations