Methods
The following methods are associated with the HfFtp class.
Abort
This method aborts the current file transfer.
Prototype
public System.Booleanean Abort ()
Parameters
None.
Return value
Indicates whether the Abort has been successful or not.
Note
This method is available in asynchronous mode only (synchronous property set to FALSE).
Connect
This method establishes a connection with the FTP server.
Prototype
public System.Booleanean Connect (String sHFUser,
String sHFPwd ,
String sSessionDesc ,
String sHostUser,
String sHostPwd);
Note
The pertinent properties must have been set prior any call to this method.
Parameters
SHFUser , sHFPwd: Name and password of the HostFront client. This will allow identification at the HostFront server level.
sSessionDesc: Description (if any) of an FTP session as defined by the HostFront administrator.
shostUser , sHostPwd: Name and password of the FTP account.
Return value
Public System.Boolean: TRUE if the connection has succeeded, FALSE otherwise
Disconnect
This method Closes the connection with the FTP server.
Parameters
None.
Return value
Public System.Booleanean: TRUE upon succeeding, FALSE otherwise
Download
This method downloads a file from the FTP server.
Prototype
public System.Booleanean Download (String sHostPath, String sLocalPath)
Parameters
sHostPath: Path of the host file to download [usually : library/file(member) ]
sLocalPath: Path of the local (PC) file where the downloaded file will be stored.
Return value
The return value depends on the synchronous property.
If the synchronous property was set to TRUE, the return value specifies the outcome of the download: TRUE if upload was successful, FALSE otherwise.
If the synchronous property was set to FALSE, the return value specifies whether the download request has been successfully accepted or not.
The outcome of the file transfer itself will be notified to the client through the EndOfFileTransfer or the Error events.
GetFiles
This method gets the list of files for a specified library.
Prototype
public System.Booleanean GetFiles (String sLibrary ,
VARIANT* pvNames ,
VARIANT* pvDesc)
Parameters
sLibrary: Name of the files parent library
pvNames: Safe array of files names
pvDesc: Safe array of files descriptions.
Return value
Indicates whether the object has been able to retrieve the list of files.
GetLibraries
This method gets the list of libraries.
Prototype
public System.Booleanean GetLibraries (VARIANT* pvNames , VARIANT* pvDesc)
Parameters
pvNames : Safe array of libraries names.
pvDesc : Safe array of libraries descriptions.
Return value
Indicates whether the object has been able to retrieve the list of libraries.
GetMembers
This method gets the list of files for a specified library.
Prototype
public System.Booleanean GetMembers (String sLibrary ,
String sFile ,
VARIANT* pvNames ,
VARIANT* pvDesc)
Parameters
sLibrary: Name of the parent library
sFile: Name of the parent file
pvNames: Safe array of member names.
pvDesc: Safe array of member descriptions.
Return value
Indicates whether the object has been able to retrieve the list of members.