Description | Hierarchy | Fields | Methods | Properties |
type TFTPSend = class(TSynaClient)
Note: Are you missing properties for setting Username and Password? Look to parent TSynaClient object! (Username and Password have default values for "anonymous" FTP login)
Are you missing properties for specify server address and port? Look to parent TSynaClient too!
Name | Description | |
---|---|---|
![]() |
CustomLogon |
Custom definition of login sequence. You can use this when you set FWMode to value -1. |
![]() |
constructor Create; |
![]() |
destructor Destroy; override; |
![]() |
procedure Abort; virtual; |
![]() |
function AppendFile(const FileName: string): Boolean; virtual; |
![]() |
function ChangeToRootDir: Boolean; virtual; |
![]() |
function ChangeWorkingDir(const Directory: string): Boolean; virtual; |
![]() |
function CreateDir(const Directory: string): Boolean; virtual; |
![]() |
function DataRead(const DestStream: TStream): Boolean; virtual; |
![]() |
function DataWrite(const SourceStream: TStream): Boolean; virtual; |
![]() |
function DeleteDir(const Directory: string): Boolean; virtual; |
![]() |
function DeleteFile(const FileName: string): Boolean; virtual; |
![]() |
function FileSize(const FileName: string): integer; virtual; |
![]() |
function FTPCommand(const Value: string): integer; virtual; |
![]() |
function GetCurrentDir: String; virtual; |
![]() |
function List(Directory: string; NameList: Boolean): Boolean; virtual; |
![]() |
function Login: Boolean; virtual; |
![]() |
function Logout: Boolean; virtual; |
![]() |
function NoOp: Boolean; virtual; |
![]() |
procedure ParseRemote(Value: string); virtual; |
![]() |
procedure ParseRemoteEPSV(Value: string); virtual; |
![]() |
function ReadResult: Integer; virtual; |
![]() |
function RenameFile(const OldName, NewName: string): Boolean; virtual; |
![]() |
function RetrieveFile(const FileName: string; Restore: Boolean): Boolean; virtual; |
![]() |
function StoreFile(const FileName: string; Restore: Boolean): Boolean; virtual; |
![]() |
function StoreUniqueFile: Boolean; virtual; |
![]() |
procedure Abort; virtual; |
Break current transmission of data. (You can call this method from Sock.OnStatus event, or from another thread.)
![]() |
function AppendFile(const FileName: string): Boolean; virtual; |
Append data to FileName on FTP server.
![]() |
function ChangeToRootDir: Boolean; virtual; |
walk to upper directory on FTP server.
![]() |
function ChangeWorkingDir(const Directory: string): Boolean; virtual; |
Change currect working directory to Directory on FTP server.
![]() |
constructor Create; |
![]() |
function CreateDir(const Directory: string): Boolean; virtual; |
Create Directory on FTP server.
![]() |
function DataRead(const DestStream: TStream): Boolean; virtual; |
Establish data channel to FTP server and retrieve data. This function you need only in special cases, i.e. when you need to implement some special unsupported FTP command!
![]() |
function DataWrite(const SourceStream: TStream): Boolean; virtual; |
Establish data channel to FTP server and send data. This function you need only in special cases, i.e. when you need to implement some special unsupported FTP command.
![]() |
function DeleteDir(const Directory: string): Boolean; virtual; |
Delete Directory on FTP server.
![]() |
function DeleteFile(const FileName: string): Boolean; virtual; |
Delete file FileName on FTP server.
![]() |
destructor Destroy; override; |
![]() |
function FileSize(const FileName: string): integer; virtual; |
Return size of Filename file on FTP server. If command failed (i.e. not implemented), return -1.
![]() |
function FTPCommand(const Value: string): integer; virtual; |
Send Value as FTP command to FTP server. Returned result code is result of this function. This command is good for sending site specific command, or non-standard commands.
![]() |
function GetCurrentDir: String; virtual; |
Return current working directory on FTP server.
![]() |
function List(Directory: string; NameList: Boolean): Boolean; virtual; |
Download directory listing of Directory on FTP server. If Directory is
empty string, download listing of current working directory.
If NameList is True
, download only names of files in directory.
(internally use NLST command instead LIST command)
If NameList is False
, returned list is also parsed to FtpList
property.
![]() |
function Login: Boolean; virtual; |
Connect and logon to FTP server. If you specify any FireWall, connect to firewall and throw them connect to FTP server. Login sequence depending on FWMode.
![]() |
function Logout: Boolean; virtual; |
Logoff and disconnect from FTP server.
![]() |
function NoOp: Boolean; virtual; |
Send NOOP command to FTP server for preserve of disconnect by inactivity timeout.
![]() |
procedure ParseRemote(Value: string); virtual; |
Parse remote side information of data channel from value string (returned by PASV command). This function you need only in special cases!
![]() |
procedure ParseRemoteEPSV(Value: string); virtual; |
Parse remote side information of data channel from value string (returned by EPSV command). This function you need only in special cases!
![]() |
function ReadResult: Integer; virtual; |
Waits and read FTP server response. You need this only in special cases!
![]() |
function RenameFile(const OldName, NewName: string): Boolean; virtual; |
Rename on FTP server file with OldName to NewName.
![]() |
function RetrieveFile(const FileName: string; Restore: Boolean): Boolean; virtual; |
Read data from FileName on FTP server. If Restore is True
and server
supports resume dowloads, download is resumed. (received is only rest
of file)
![]() |
function StoreFile(const FileName: string; Restore: Boolean): Boolean; virtual; |
Send data to FileName on FTP server. If Restore is True
and server
supports resume upload, upload is resumed. (send only rest of file)
In this case if remote file is same length as local file, nothing will be
done. If remote file is larger then local, resume is disabled and file is
transfered from begin!
![]() |
function StoreUniqueFile: Boolean; virtual; |
Send data to FTP server and assing unique name for this file.
![]() |
property Account: string; |
![]() |
property AutoTLS: Boolean; |
![]() |
property BinaryMode: Boolean; |
![]() |
property CanResume: Boolean; |
![]() |
property DataIP: string; |
![]() |
property DataPort: string; |
![]() |
property DataStream: TMemoryStream; |
![]() |
property DirectFile: Boolean; |
![]() |
property DirectFileName: string; |
![]() |
property DSock: TTCPBlockSocket; |
![]() |
property ForceDefaultPort: Boolean; |
![]() |
property ForceOldPort: Boolean; |
![]() |
property FtpList: TFTPList; |
![]() |
property FullResult: TStringList; |
![]() |
property FullSSL: Boolean; |
![]() |
property FWHost: string; |
![]() |
property FWMode: integer; |
![]() |
property FWPassword: string; |
![]() |
property FWPort: string; |
![]() |
property FWUsername: string; |
![]() |
property IsDataTLS: Boolean; |
![]() |
property IsTLS: Boolean; |
![]() |
property OnStatus: TFTPStatus; |
![]() |
property PassiveMode: Boolean; |
![]() |
property ResultCode: Integer; |
![]() |
property ResultString: string; |
![]() |
property Sock: TTCPBlockSocket; |
![]() |
property TLSonData: Boolean; |
![]() |
property Account: string; |
Account information used in some cases inside login sequence.
![]() |
property AutoTLS: Boolean; |
if is true, then if server support upgrade to SSL/TLS mode, then use them.
![]() |
property BinaryMode: Boolean; |
if True
(default), then data transfers is in binary mode. If this is set
to False
, then ASCII mode is used.
![]() |
property CanResume: Boolean; |
Indicate after Login if remote server support resume downloads and uploads.
![]() |
property DataIP: string; |
After data connection is established, contains remote side IP of this connection.
![]() |
property DataPort: string; |
After data connection is established, contains remote side port of this connection.
![]() |
property DataStream: TMemoryStream; |
If you not use DirectFile mode, all data transfers is made to or from this stream.
![]() |
property DirectFile: Boolean; |
Mode of data handling by data connection. If False
, all data operations
are made to or from DataStream TMemoryStream.
If True
, data operations is made directly to file in your disk. (filename
is specified by DirectFileName property.) Dafault is False
!
![]() |
property DirectFileName: string; |
Filename for direct disk data operations.
![]() |
property DSock: TTCPBlockSocket; |
Socket object used for TCP/IP operation on data channel. Good for seting OnStatus hook, etc.
![]() |
property ForceDefaultPort: Boolean; |
Force to listen for dataconnection on standard port (20). Default is False
,
dataconnections will be made to any non-standard port reported by PORT FTP
command. This setting is not used, if you use passive mode.
![]() |
property ForceOldPort: Boolean; |
When is True
, then is disabled EPSV and EPRT support. However without this
commands you cannot use IPv6! (Disabling of this commands is needed only
when you are behind some crap firewall/NAT.
![]() |
property FtpList: TFTPList; |
After LIST command is here parsed list of files in given directory.
![]() |
property FullResult: TStringList; |
After any FTP command it contains all lines of FTP server reply.
![]() |
property FullSSL: Boolean; |
if server listen on SSL/TLS port, then you set this to true.
![]() |
property FWHost: string; |
Address of firewall. If empty string (default), firewall not used.
![]() |
property FWMode: integer; |
Type of Firewall. Used only if you set some firewall address. Supported predefined firewall login sequences are described by comments in source file where you can see pseudocode decribing each sequence.
![]() |
property FWPassword: string; |
password for login to firewall. (if needed)
![]() |
property FWPort: string; |
port of firewall. standard value is same port as ftp server used. (21)
![]() |
property FWUsername: string; |
Username for login to firewall. (if needed)
![]() |
property IsDataTLS: Boolean; |
Signalise, if data transfers is in SSL/TLS mode.
![]() |
property IsTLS: Boolean; |
Signalise, if control channel is in SSL/TLS mode.
![]() |
property OnStatus: TFTPStatus; |
You may set this hook for monitoring FTP commands and replies.
![]() |
property PassiveMode: Boolean; |
If true (default value), all transfers is made by passive method. It is safer method for various firewalls.
![]() |
property ResultCode: Integer; |
After FTP command contains result number of this operation.
![]() |
property ResultString: string; |
After FTP command contains main line of result.
![]() |
property Sock: TTCPBlockSocket; |
Socket object used for TCP/IP operation on control channel. Good for seting OnStatus hook, etc.
![]() |
property TLSonData: Boolean; |
If True
(default), then try to use SSL/TLS on data transfers too.
If False
, then SSL/TLS is used only for control connection.