ftp class
An implementation of the client side of FTP protocol.
Inherits
object
Description
This class provides a standard FTP functionality.
Functions
$dataAvailableEvent(<data_length>)
This function is called when some data is available to be read.
The <data_length> parameter specifies the length of the available data in bytes.
You can use one of the $read* functions to obtain the data.
<id:integer> $connect(<host:string>,<remote_port:integer>)
Connects to the FTP server host using port port.
The command is scheduled, and its execution is performed asynchronously.
The function returns a unique identifier which is passed by commandStarted() and commandFinished().
$abort()
Aborts the current command and deletes all scheduled commands.
<id:integer> $login(<user:string>,<pass:string>)
Logs in to the FTP server with the username user and the password <pass>.
The function returns a unique identifier which is passed by commandStarted() and commandFinished().
<id:integer> $get(<remotefile:string>,<localfile:string>)
Downloads the <remotefile> file from the server.
<id:integer> $put(<localfile:string>,<remotefile:string>)
Uploads the <localfile> to the server.
<id:integer> $cd(<remotedir:string>)
Changes the working directory of the server to <remotedir>.
<id:integer> $list()
Lists the contents of the directory on the FTP server.
$commandFinishedEvent(<id:integer>,<error:boolean>)
Called by KVIrc when the FTP command identified by ID has finished.
Error is true if an error occurred during the processing; otherwise error is false.
The default implementation emits the $commandFinished() signal.
$listInfoEvent(<dir_entry_name:string>)
This event is triggered for each directory entry found by $list() command.
The default implementation emits the $listInfo() signal.
$dataTransferProgressEvent(<done:integer>,<total:integer>)
This event is triggered in response to a get() or put() request to indicate the current progress of the download or upload.
The default implementation emits the $dataTransferProgress() signal.
Signals
$commandFinished(<id:integer>,<szCommand:string>,<error:boolean>)
This signal is emitted by the default implementation of $commandFinishedEvent()
$listInfo(<dir_entry_name:string>)
This signal is emitted by the default implementation of $listInfoEvent()
$dataTransferProgress(<done:integer>,<total:integer>)
This signal is emitted by the default implementation of $dataTransferProgressEvent()

Index, Object Classes