|
Integral FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--FTPClient
FTPClient is the main interface for the Integral FTP library. It contains
methods for connecting to FTP servers, downloading and uploading files, listing
local and remote directories, and renaming and deleting local and remote files.
Please refer to the Integral FTP Developer's Guide
for a broad description of how this class may be used.
Defined in ftpclient.js
Field Summary | |
Object |
_instance
|
Object |
dateLanguages
Language(s) to use when attempting parse dates in directory listings. |
string |
id
Unique identifier for this instance of FTPClient. |
string |
initialRemoteDirectory
Initial remote directory on FTP server. |
Object |
localSeparator
Path separator of local file-system. |
boolean |
localSortAscending
Flag controlling the sort-order (ascending or descending) of files returned by localDirectoryList(). |
string |
localSortColumn
Attribute by which the list files returned by localDirectoryList() are sorted. |
string |
logLevel
Level of logging (Possible values are "OFF", "ERROR", "INFO", "DEBUG" and "ALL"). |
boolean |
logToFile
If true then logging will be written to a file called "IntegralFTP.log" in the machine's temporary directory. |
int |
maxPoolSize
Maximum number of connections that the client makes with the server. |
int |
minPoolSize
Minimum number of connections that the client makes with the server. |
int |
minTransferNotifyPeriod
Minimum number of milliseconds between progress updates. |
string |
password
Password of account on FTP server |
string |
protocol
File transfer protocol to use (FTP, FTPS or SFTP). |
string |
remoteHost
Domain name or IP address (and optionally port) of FTP server. |
boolean |
remoteSortAscending
Flag controlling the sort-order (ascending or descending) of files returned by remoteDirectoryList. |
string |
remoteSortColumn
Attribute by which the list files returned by remoteDirectoryList are sorted. |
boolean |
showSplash
Controls whether or not the EnterpriseDT splash screen is displayed on start-up. |
string |
splashImageURL
URL of splash image. |
int |
transferBufferSize
Size of the data buffers (in bytes) used in reading and writing to the server. |
int |
transferNotifyInterval
Deprecated: Use minTransferNotifyPeriod instead. |
string |
userName
User-name of account on FTP server |
<final> Object |
WRITEMODE_APPEND
Constant used in downloadFile() and uploadFile() to direct FTPClient to append to the existing file (if any). |
<final> Object |
WRITEMODE_OVERWRITE
Constant used in downloadFile() and uploadFile() to direct FTPClient to overwrite any existing file with the same name. |
<final> Object |
WRITEMODE_RESUME
Constant used in downloadFile() and uploadFile() to direct FTPClient to resume any previous transfer from the point at which is was stopped last time. |
Constructor Summary | |
FTPClient()
Constructs a new FTPClient object. |
Method Summary | |
int
|
alert(<string> message)
Shows a message-box with an OK button [ASYNCHRONOUS - no callback]. |
int
|
ask(<string> message, <callback> callbackFunction, <object> tag, <string> button1Text, <string> button2Text, <string> button3Text)
Prompts the user with a message and allows them to press one of two or three buttons [ASYNCHRONOUS - calls user-specified method when complete]. |
void
|
cancelTransfer(<int> transferID)
Cancels the transfer specified by the given identifier. |
int
|
changeDirectory(<string> directory, <object> tag)
Changes the working directory on the server [ASYNCHRONOUS - calls onChangeDirectory() when complete]. |
int
|
connect(<object> tag)
Connect to an FTP server [ASYNCHRONOUS - calls onConnect() when complete]. |
int
|
createDirectory(<string> directory, <object> tag)
Creates a new directory on the server [ASYNCHRONOUS - calls onCreateDirectory() when complete]. |
int
|
deleteDirectory(<string> remoteDirectoryName, <object> tag)
Delete a directory [ASYNCHRONOUS - calls onDeleteDirectory() when complete]. |
int
|
deleteFile(<string> remoteFileName, <object> tag)
Delete a file [ASYNCHRONOUS - calls onDeleteFile() when complete]. |
int
|
directoryList(<string> directory, <object> tag)
List the contents of a remote directory [ASYNCHRONOUS - calls onDirectoryList() when complete]. |
int
|
disconnect(<object> tag)
Disconnects from the server [ASYNCHRONOUS - calls onDisconnect() when complete]. |
int
|
downloadFile(<string> localFileName, <string> remoteFileName, <int> writeMode, <object> tag)
Downloads a file [ASYNCHRONOUS - calls onDownloadFile() when complete]. |
int
|
downloadText(<string> remoteFileName, <object> tag)
Downloads a file into a JavaScript string [ASYNCHRONOUS - calls onDownloadText() when complete]. |
int
|
executeCommand(<string> command, <object> tag)
Executes an arbitrary FTP command. |
int
|
exists(<string> remoteFileName, <object> tag)
Checks for the existence of a file [ASYNCHRONOUS - calls onExists() when complete]. |
string[]
|
getAllLogLevels()
Returns an array of strings containing the names of all the valid logging levels. |
string
|
getCharacterSet()
Returns the current character-set. |
string
|
getConnectMode()
Returns the current connection-mode. |
int
|
getLocalAcceptorPort()
Gets the number of the port to which HTTP requests may be directed when viewing the contents of a local file. |
string
|
getLocalHomeDirectory()
Gets the name of the user's home directory. |
string
|
getLocalTempDirectory()
Gets the name of the user's TEMP directory. |
string
|
getLogLevel()
Returns the current logging level. |
int
|
getRemoteAcceptorPort()
Gets the number of the port to which HTTP requests may be directed when viewing the contents of a remote file. |
string
|
getTransferType()
Returns the current transfer-type. |
string
|
getWorkingDirectory()
Get the current remote working directory. |
void
|
initialize(<string> jarURL, <boolean> showSplash, <string> logLevel, <boolean> logToFile, <int> minPoolSize, <int> maxPoolSize)
Initializes the FTPClient instance [ASYNCHRONOUS - calls onInitialize() when complete]. |
boolean
|
isConnected()
Returns true if this FTPClient is currently connected to a server. |
int
|
isInitialized()
Returns true if the FTPClient has been initialized. |
boolean
|
isKeepAliveEnabled()
Is the connection pool's keep alive thread enabled, i.e. |
Object
|
isRemoteHostValid(hostName)
Returns true is the given host-name can be parsed. |
boolean
|
isViewCachingEnabled()
Returns true if view-caching is enabled. |
int
|
localCreateDirectory(<string> directoryName, <object> tag)
Creates a directory on the local disk [ASYNCHRONOUS - calls onLocalCreateDirectory() when complete]. |
int
|
localDeleteFile(<string> fileName, <object> tag)
Delete a local file [ASYNCHRONOUS - calls onLocalDeleteFile() when complete]. |
int
|
localDirectoryList(<string> dirPath, <object> tag)
List the contents of a local directory [ASYNCHRONOUS - calls onLocalDirectoryList() when complete]. |
int
|
localModifiedTime(<string> fileName, <object> tag)
Get the last-modified time of a local file [ASYNCHRONOUS - calls onLocalModifiedTime() when complete]. |
int
|
localRename(<string> oldFileName, <string> newFileName, <object> tag)
Rename a local file [ASYNCHRONOUS - calls onLocalRename() when complete]. |
int
|
localSize(<string> fileName, <object> tag)
Get the size of a local file [ASYNCHRONOUS - calls onLocalSize() when complete]. |
int
|
modifiedTime(<string> remoteFileName, <object> tag)
Gets the last-modified time of a file [ASYNCHRONOUS - calls onModifiedTime() when complete]. |
callback
|
onChangeDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory)
Callback for the changeDirectory() method. |
callback
|
onConnect(<FTPCallbackStatus> callbackStatus)
Callback for the connect() method. |
callback
|
onCreateDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory)
Callback for the createDirectory() method. |
callback
|
onDeleteDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectoryName)
Callback for the deleteDirectory() method. |
callback
|
onDeleteFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
Callback for the deleteFile() method. |
callback
|
onDirectoryList(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory, <FTPFileList> fileList)
Callback for the directoryList() method. |
callback
|
onDisconnect(<FTPCallbackStatus> callbackStatus, <int> reasonCode, <string> reasonMessage)
Callback for the disconnect() method. |
callback
|
onDownloadFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
Callback for the downloadFile() method. |
callback
|
onDownloadText(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <string> text)
Callback for the downloadText() method. |
callback
|
onError(<FTPCallbackStatus> callbackStatus)
Callback for all errors. |
callback
|
onExecuteCommand(<FTPCallbackStatus> callbackStatus, <string> command, <string> result)
Callback for the executeCommand() method. |
callback
|
onExists(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <boolean> exists)
Callback for the exists() method. |
callback
|
onInitialize(<FTPCallbackStatus> callbackStatus)
Callback for the initialize() method. |
callback
|
onLocalCreateDirectory(<FTPCallbackStatus> callbackStatus, <string> localDirectory)
Callback for the localCreateDirectory() method. |
callback
|
onLocalDeleteFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
Callback for the localDeleteFile() method. |
callback
|
onLocalDirectoryList(<FTPCallbackStatus> callbackStatus, <string> localDirectory, <FTPFileList> fileList)
Callback for the localDirectoryList() method. |
callback
|
onLocalModifiedTime(<FTPCallbackStatus> callbackStatus, <string> localFileName, <Date> modTime)
Callback for the localModifiedTime() method. |
callback
|
onLocalRename(<FTPCallbackStatus> callbackStatus, <string> fromName, <string> toName)
Callback for the localRename() method. |
callback
|
onLocalSize(<FTPCallbackStatus> callbackStatus, <string> localFileName, <int> size)
Callback for the localSize() method. |
callback
|
onModifiedTime(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <Date> modTime)
Callback for the modifiedTime() method. |
callback
|
onRename(<FTPCallbackStatus> callbackStatus, <string> fromName, <string> toName)
Callback for the rename() method. |
callback
|
onSize(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <int> size)
Callback for the size() method. |
callback
|
onTransferProgress(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <int> byteCount)
Callback for transfer-progress updates. |
callback
|
onUploadFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
Callback for the uploadFile() method. |
callback
|
onUploadText(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
Callback for the uploadText() method. |
int
|
promptFile(<boolean> isOpen, <callback> callbackFunction, <object> tag, <string> title, <string> directory, <string> file)
Prompts the user for a file [ASYNCHRONOUS - calls user-specified method when complete]. |
int
|
promptFiles(<callback> callbackFunction, <object> tag, <string> title, <string> directory)
Prompts the user for multiple files. |
void
|
registerMimeType(<string> extension, <string> mimeType)
Registers an extension as a particular MIME type. |
int
|
rename(<string> fromFileName, <string> toFileName, <object> tag)
Rename a file [ASYNCHRONOUS - calls onRename() when complete]. |
void
|
setCharacterSet(<string> charSet)
Sets the current character-set. |
void
|
setConnectMode(<string> mode)
Sets the connection-mode of data-channels to "active" or "passive". |
void
|
setKeepAliveEnabled(<boolean> enabled)
Change the connection pool keep alive setting, switching it on or off. |
void
|
setLogLevel(<string> level)
Sets the current logging level. |
void
|
setTemplateURLs(<string> localViewURL, localTextEditorURL, localHTMLEditorURL, <string> remoteViewURL, remoteTextEditorURL, remoteHTMLEditorURL)
Sets the view and editing templates. |
void
|
setTransferType(type)
Sets the transfer-type of data-channels to "ascii" or "passive". |
void
|
setViewCachingEnabled(<boolean> enable)
Controls whether view caching is enabled (the default is true). |
int
|
size(<string> remoteFileName, <object> tag)
Gets the size of a file [ASYNCHRONOUS - calls onSize() when complete]. |
int
|
uploadFile(<string> localFileName, <string> remoteFileName, <int> writeMode, <object> tag)
Uploads a file [ASYNCHRONOUS - calls onUploadFile() when complete]. |
int
|
uploadText(<string> text, <string> remoteFileName, <object> tag)
Uploads a JavaScript string to a file on the server [ASYNCHRONOUS - calls onUploadText() when complete]. |
Field Detail |
Object _instance
Object dateLanguages
string id
string initialRemoteDirectory
Object localSeparator
boolean localSortAscending
string localSortColumn
string logLevel
boolean logToFile
int maxPoolSize
int minPoolSize
int minTransferNotifyPeriod
string password
string protocol
string remoteHost
boolean remoteSortAscending
string remoteSortColumn
boolean showSplash
string splashImageURL
int transferBufferSize
int transferNotifyInterval
string userName
<final> Object WRITEMODE_APPEND
<final> Object WRITEMODE_OVERWRITE
<final> Object WRITEMODE_RESUME
Constructor Detail |
FTPClient()
Method Detail |
int alert(<string> message)
message
- Message to be displayed.
int ask(<string> message, <callback> callbackFunction, <object> tag, <string> button1Text, <string> button2Text, <string> button3Text)
message
- Message to be displayed as a prompt.
callbackFunction
- Function to be called when the user has pressed a button.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
button1Text
- Text of first button.
button2Text
- Text of second button.
button3Text
- Text of third button.
void cancelTransfer(<int> transferID)
transferID
- Identifier of the transfer to be cancelled.
int changeDirectory(<string> directory, <object> tag)
directory
- Directory to change into.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int connect(<object> tag)
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int createDirectory(<string> directory, <object> tag)
directory
- Name of the directory to create.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int deleteDirectory(<string> remoteDirectoryName, <object> tag)
remoteDirectoryName
- Name of the directory to delete.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int deleteFile(<string> remoteFileName, <object> tag)
remoteFileName
- Name of the file to delete.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int directoryList(<string> directory, <object> tag)
directory
- Name of directory to list.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int disconnect(<object> tag)
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int downloadFile(<string> localFileName, <string> remoteFileName, <int> writeMode, <object> tag)
localFileName
- Name of local file to download to.
remoteFileName
- Name of remote file to download.
writeMode
- Specifies whether a file is overwritten (WRITEMODE_OVERWRITE), resumed (WRITEMODE_RESUME) or appended to (WRITEMODE_APPEND).
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int downloadText(<string> remoteFileName, <object> tag)
remoteFileName
- Name of the file to download.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int executeCommand(<string> command, <object> tag)
command
- Command to be executed.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int exists(<string> remoteFileName, <object> tag)
remoteFileName
- Name of the file to find.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
string[] getAllLogLevels()
string getCharacterSet()
string getConnectMode()
int getLocalAcceptorPort()
string getLocalHomeDirectory()
string getLocalTempDirectory()
string getLogLevel()
int getRemoteAcceptorPort()
string getTransferType()
string getWorkingDirectory()
void initialize(<string> jarURL, <boolean> showSplash, <string> logLevel, <boolean> logToFile, <int> minPoolSize, <int> maxPoolSize)
jarURL
- The absolute or relative URL of the IntegralFTP.jar file.
showSplash
- Determines whether or not the EnterpriseDT splash will be displayed.
logLevel
- Level of logging (Possible values are "OFF", "ERROR", "INFO", "DEBUG" and "ALL"). Logging is written to the Java console and optionally to a log-file (see below).
logToFile
- If true then logging will be written to a file called "IntegralFTP.log" in the machine's temporary directory.
minPoolSize
- Minimum number of connections that the client will make to the server.
maxPoolSize
- Maximum number of connections that the client may make to the server.
boolean isConnected()
int isInitialized()
boolean isKeepAliveEnabled()
Object isRemoteHostValid(hostName)
string
- ) hostName Host-name to be checked.
boolean isViewCachingEnabled()
int localCreateDirectory(<string> directoryName, <object> tag)
directoryName
- Path of the directory to create.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int localDeleteFile(<string> fileName, <object> tag)
fileName
- Name of local file to delete.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int localDirectoryList(<string> dirPath, <object> tag)
dirPath
- Path of local directory to be listed.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int localModifiedTime(<string> fileName, <object> tag)
fileName
- Path of the local file.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int localRename(<string> oldFileName, <string> newFileName, <object> tag)
oldFileName
- Path of file to rename.
newFileName
- New name of file.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int localSize(<string> fileName, <object> tag)
fileName
- Path of the file.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int modifiedTime(<string> remoteFileName, <object> tag)
remoteFileName
- Name of the file.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
callback onChangeDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteDirectory
- Name of remote working directory.
callback onConnect(<FTPCallbackStatus> callbackStatus)
callbackStatus
- Status information (see FTPCallbackStatus).
callback onCreateDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteDirectory
- Name of the directory that was created.
callback onDeleteDirectory(<FTPCallbackStatus> callbackStatus, <string> remoteDirectoryName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteDirectoryName
- Name of the directory.
callback onDeleteFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file.
callback onDirectoryList(<FTPCallbackStatus> callbackStatus, <string> remoteDirectory, <FTPFileList> fileList)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteDirectory
- Name of the directory being listed.
fileList
- FTPFileList containing the files.
callback onDisconnect(<FTPCallbackStatus> callbackStatus, <int> reasonCode, <string> reasonMessage)
callbackStatus
- Status information (see FTPCallbackStatus).
reasonCode
- Code describing the reason for the disconnection (0=Normal disconnection, 1=Inactive for too long, 2=Lost connection, other=Unknown vause).
reasonMessage
- Message describing the reason for the disconnection ("Normal disconnection", "Inactive for too long", "Lost connection", "Unknown cause").
callback onDownloadFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file that was downloaded.
callback onDownloadText(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <string> text)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file that was downloaded (as text).
text
- String containing the contents of the file.
callback onError(<FTPCallbackStatus> callbackStatus)
callbackStatus
- Status information (see FTPCallbackStatus).
callback onExecuteCommand(<FTPCallbackStatus> callbackStatus, <string> command, <string> result)
callbackStatus
- Status information (see FTPCallbackStatus).
command
- FTP command executed.
result
- Server's response to FTP command.
callback onExists(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <boolean> exists)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file.
exists
- true if the file exists and false otherwise.
callback onInitialize(<FTPCallbackStatus> callbackStatus)
callbackStatus
- Status information (see FTPCallbackStatus).
callback onLocalCreateDirectory(<FTPCallbackStatus> callbackStatus, <string> localDirectory)
callbackStatus
- Status information (see FTPCallbackStatus).
localDirectory
- Name of the directory that was created.
callback onLocalDeleteFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file.
callback onLocalDirectoryList(<FTPCallbackStatus> callbackStatus, <string> localDirectory, <FTPFileList> fileList)
callbackStatus
- Status information (see FTPCallbackStatus).
localDirectory
- Name of the directory being listed.
fileList
- FTPFileList containing the files.
callback onLocalModifiedTime(<FTPCallbackStatus> callbackStatus, <string> localFileName, <Date> modTime)
callbackStatus
- Status information (see FTPCallbackStatus).
localFileName
- Name of the file.
modTime
- Last modified time of the file.
callback onLocalRename(<FTPCallbackStatus> callbackStatus, <string> fromName, <string> toName)
callbackStatus
- Status information (see FTPCallbackStatus).
fromName
- Previous name of file.
toName
- New name of file.
callback onLocalSize(<FTPCallbackStatus> callbackStatus, <string> localFileName, <int> size)
callbackStatus
- Status information (see FTPCallbackStatus).
localFileName
- Name of the file.
size
- Size of the file in bytes.
callback onModifiedTime(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <Date> modTime)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file.
modTime
- Last modified time of the file.
callback onRename(<FTPCallbackStatus> callbackStatus, <string> fromName, <string> toName)
callbackStatus
- Status information (see FTPCallbackStatus).
fromName
- Previous name of file.
toName
- New name of file.
callback onSize(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <int> size)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file.
size
- Size of the file in bytes.
callback onTransferProgress(<FTPCallbackStatus> callbackStatus, <string> remoteFileName, <int> byteCount)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file being transferred.
byteCount
- Number of bytes that have been transferred so far.
callback onUploadFile(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file that was uploaded
callback onUploadText(<FTPCallbackStatus> callbackStatus, <string> remoteFileName)
callbackStatus
- Status information (see FTPCallbackStatus).
remoteFileName
- Name of the file that the text was uploaded to.
int promptFile(<boolean> isOpen, <callback> callbackFunction, <object> tag, <string> title, <string> directory, <string> file)
isOpen
- Should this be an open-file dialog (true) or a save-file dialog (false)
callbackFunction
- Function to be called when the user has pressed a button.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
title
- Title of dialog
directory
- Starting directory of dialog
file
- Initially selected file
int promptFiles(<callback> callbackFunction, <object> tag, <string> title, <string> directory)
callbackFunction
- Function to be called when the user has pressed a button.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
title
- Title of dialog
directory
- Starting directory of dialog
void registerMimeType(<string> extension, <string> mimeType)
extension
- File-extension
mimeType
- MIME type
int rename(<string> fromFileName, <string> toFileName, <object> tag)
fromFileName
- File to rename.
toFileName
- New file-name.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
void setCharacterSet(<string> charSet)
charSet
- Character-set.
void setConnectMode(<string> mode)
mode
- Connection mode (must be "active" or "passive").
void setKeepAliveEnabled(<boolean> enabled)
enabled
- true to enable, false to disable
void setLogLevel(<string> level)
level
- Desired logging level.
void setTemplateURLs(<string> localViewURL, localTextEditorURL, localHTMLEditorURL, <string> remoteViewURL, remoteTextEditorURL, remoteHTMLEditorURL)
localViewURL
- URL Template for viewing local files.
remoteViewURL
- URL Template for viewing remote files.
localEditorURL
- URL Template for editing local files.
removeEditorURL
- URL Template for editing remote files.
void setTransferType(type)
mode
- Connection mode (must be "ascii" or "passive").
void setViewCachingEnabled(<boolean> enable)
enable
- Set to true is view caching is desired.
int size(<string> remoteFileName, <object> tag)
remoteFileName
- Name of the remote file.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int uploadFile(<string> localFileName, <string> remoteFileName, <int> writeMode, <object> tag)
localFileName
- Name of the local file to upload.
remoteFileName
- Name of the remote file to upload to.
writeMode
- Specifies whether a file is overwritten (WRITEMODE_OVERWRITE), resumed (WRITEMODE_RESUME) or appended to (WRITEMODE_APPEND).
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
int uploadText(<string> text, <string> remoteFileName, <object> tag)
text
- String to upload.
remoteFileName
- Name of the file to write on the remote server.
tag
- The value of this argument is not used by FTPClient, but is simply passed to the callback when the operation is complete. From there is may be accessed via the FTPCallbackStatus.tag field.
|
Integral FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |