Unit CYFtp

Classes

TMFtp -

Functions

ExtractField -
FTPExtractName - Misc.
FTPExtractSymLink -
ParseListingLine - n is 0 based
StrProc -

Types

FtpError
FtpInfo
TMFtpErrorEvent
TMFtpInfoEvent
TMFtpInfoNeeded
TMFtpInfoNeededEvent
TMFtpLastAction
TMFtpProxyType
TMFtpServerType
TNewLineProc
TTransferType

Constants

BUFFER_SIZE
FTP_AVAILABLE
FTP_READY
WM_Proceed

Variables


Functions


function ExtractField(line: String; n: Integer): String;


function FTPExtractName(line: String; t: String): String;

Misc. functions

function FTPExtractSymLink(line: String): String;


function ParseListingLine(ServerType: TMFtpServerType; line: String; var name, size, date, symlink, attrib: String; var IsDir: Boolean): Boolean;

n is 0 based

function StrProc(S: String): String;


Types


FtpError = (ftpNone, ftpWinsockNotInitialized, ftpNetworkDown, ftpInvalidAddress, ftpInternalError,
   ftpGeneralWinsockError, ftpConnAborted, ftpConnReset, ftpConnectTimeOut,
   ftpOutofSockets, ftpNetworkUnreachable, ftpAddressNotAvailable,
   ftpConnectionRefused, ftpProtocolError, ftpCanceled, ftpUnknown,
   ftpAddressResolutionError, ftpPrematureDisconnect,
   ftpHostUnreachable, ftpNoServer, ftpNoProxyServer,
   ftpFileOpen, ftpFileWrite, ftpFileRead, ftpFileNotFound,
   ftpTimeOut, ftpServerDown, ftpAccessDenied, ftpDataError);

FtpInfo = (ftpServerConnected, ftpServerDisconnected, ftpResolvingAddress, ftpAddressResolved,
   ftpTraceIn, ftpTraceOut, ftpAlreadyBusy, ftpSupportResume, ftpResumeFailed,
   ftpDataTrace, ftpReady, ftpTransferDone, ftpDirectoryRefresh, ftpBadURL,
   ftpLoggedIn, ftpFileSize, ftpPermissionDenied, ftpListing, ftpStartListing,
   ftpStoringFile, ftpGettingFile, ftpDeleting);

TMFtpErrorEvent = procedure (Sender: TObject; error: FtpError; addinfo: String) of object

TMFtpInfoEvent = procedure (Sender: TObject; info: FtpInfo; addinfo: String) of object

TMFtpInfoNeeded = (niHost, niUser, niPassword, niAccount, niLocalFile,
                        niOverwrite);

TMFtpInfoNeededEvent = procedure (Sender: TObject; need: TMFtpInfoNeeded; var value: String) of object

TMFtpLastAction = (ftplaNONE, ftplaLOGIN, ftplaCWD, ftplaMKD, ftplaRMD,
   ftplaRM, ftplaGET, ftplaPUT, ftplaLIST, ftplaREN, ftplaCDUP,
   ftplaGETS, ftplaPUTS, ftplaRMS);

TMFtpProxyType = (proxyNone, proxyOpen, proxySite, proxyUserSite);

TMFtpServerType = (ftpstDefault, ftpstAutoDetect, ftpstUNIX, ftpstULTRIX, ftpstU5000, ftpstSINTMftpD,
   ftpstVmsMultinet, ftpstVmsUcx, ftpstMVS, ftpstMacFtpd, ftpstClix, ftpstQVT,
   ftpstNCSA, ftpstChameleon, ftpstVM, ftpstVMVPS);
BUFFER_SIZE = 0 (mod 1024
TNewLineProc = procedure(line: String) of object

TTransferType = (BinaryTransfer, AsciiTransfer);

Constants

BUFFER_SIZE = 8192

FTP_AVAILABLE = WM_USER + 2

Renamed from FTP.pas 6/13/1998 Paul Rice to avoid conflicts with others' work. Monster FTP Client VCL 0.2.2 written by Chen Yu (monster) e-Mail: lnscth@zsu.edu.cn Suggestions and bug reports are warm welcomed. Notes: * You can use it free because it is terms of the GNU Library General Public License. * If you modified the code, please send me a copy via email so that I can improve the component. * Some methods like FileSetAttr are not supported by all ftp servers. * This code is based on TStarFTP and TStarSock from Tony BenBrahim's freenet 2.0. * Some code is under developing, define "incomplete" to re-enable them. * Many thanks to Brad Stowers (http://www.pobox.com/~bstowers/delphi/) who gives me a lot of good advise. * You now can change the size of incoming/outgoing buffer to get better performance.

FTP_READY = WM_USER + 4

FTP_ERROR = WM_USER + 3;

WM_Proceed = WM_USER + 1


Variables