Object | +--helma.Ftp
This class represents a FTP client, providing
access to an FTP server.
The FTP client needs Daniel Savarese's NetComponents
library in the classpath in order to work.
Defined in Ftp.js
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |
| Constructor Summary | |
helma.Ftp(<String> server)
Constructor for FTP client objects, to send and receive files from an FTP server. |
|
| Properties Summary | |
Object |
server
|
Object |
status
|
| Methods Summary | |
Object
|
active()
Switches the connection to use active mode. |
Object
|
ascii()
Sets transfer mode to ascii for transmitting text-based data. |
Object
|
binary()
Sets transfer mode to binary for transmitting images and other non-text files. |
Object
|
cd(path)
Changes the working directory on the FTP server. |
Object
|
deleteFile(remoteFile)
|
Object
|
dir(path)
|
Object
|
getFile(<String> remoteFile, <String> localFile)
Transfers a file from the FTP server to the local file system. |
Object
|
getString(remoteFile)
|
Object
|
lcd(<String> dir)
Changes the working directory of the local machine when being connected to an FTP server. |
Boolean
|
login(<String> username, <String> password)
Logs in to the FTP server. |
Object
|
logout()
Terminates the current FTP session. |
Boolean
|
mkdir(<String> dir)
Creates a new directory on the server. |
Object
|
passive()
Switches the connection to use passive mode. |
Boolean
|
putFile(<String> localFile, <String> remoteFile)
Transfers a file from the local file system to the remote server. |
Boolean
|
putString(<String> str, <String> remoteFile, <String> charset)
Transfers text from a string to a file on the FTP server. |
Object
|
pwd()
|
Boolean
|
rmdir(<String> dir)
Deletes a directory on the FTP server. |
Object
|
setReadTimeout(timeout)
Set the default timeout in milliseconds to use when opening a socket. |
Object
|
setTimeout(timeout)
Sets the timeout in milliseconds to use when reading from the data connection. |
| Constructor Detail |
helma.Ftp(<String> server)
server - as String, the address of the FTP Server to connect to
| Properties Detail |
Object server
Object status
| Method Detail |
Object active()
Object ascii()
Object binary()
Object cd(path)
dir - as String, the path that the remote working directory should be changed to
Object deleteFile(remoteFile)
Object dir(path)
Object getFile(<String> remoteFile, <String> localFile)
remoteFile - as String, the name of the file that should be downloaded
localFile - as String, the name which the file should be stored under
Object getString(remoteFile)
Object lcd(<String> dir)
dir - as String, the path that the local working directory should be changed to
Boolean login(<String> username, <String> password)
username - as String
password - as String
Object logout()
Boolean mkdir(<String> dir)
dir - as String, the name of the directory to be created
Object passive()
Boolean putFile(<String> localFile, <String> remoteFile)
localFile - as String, the name of the file to be uploaded
remoteFile - as String, the name of the remote destination file
Boolean putString(<String> str, <String> remoteFile, <String> charset)
str - as String, the text content that should be uploaded
remoteFile - as String, the name of the remote destination file
charset - as String, optional
Object pwd()
Boolean rmdir(<String> dir)
dir - as String, the name of the directory to be deleted
Object setReadTimeout(timeout)
Object setTimeout(timeout)
| SUMMARY: Constructor | Properties | Methods | DETAIL: Constructor | Properties | Methods |