|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ipworks.Ftp
The FTP control can be used to transfer files to and from FTP servers using the FTP Protocol.
The FTP control implements a standard FTP client as specified in RFC 959 and RFC 1579.
The first step in using the control is specifying the RemoteHost
, User
and Password
. The file to upload to or download from is
given by the RemoteFile
property. The file to download to or upload
from is specified by LocalFile
. The current path in the server is
specified by the RemotePath
property. The Passive
property
is especially useful if the client is behind a firewall which inhibits
incoming connections to higher ports.
The control operates by calling methods or setting appropriate
values to the Action
property. If LocalFile
is set to something
other than an empty string, then files are received in LocalFile
,
otherwise the data is received through the Transfer
event
. StartTransfer
and EndTransfer
are fired at the beginning and end of transmission.
The PITrail
event
traces the interaction between the client and the server (the FTP Protocol
Interface connection).
Directory listings are received through the DirList
event.
Field Summary | |
static int |
ftpAbort
|
static int |
ftpAppend
|
static int |
ftpDeleteFile
|
static int |
ftpDownload
|
static int |
ftpIdle
|
static int |
ftpListDirectory
|
static int |
ftpListDirectoryLong
|
static int |
ftpLogoff
|
static int |
ftpLogon
|
static int |
ftpMakeDirectory
|
static int |
ftpRemoveDirectory
|
static int |
ftpRenameFile
|
static int |
ftpStoreUnique
|
static int |
ftpUpload
|
static int |
fwNone
|
static int |
fwSOCKS4
|
static int |
fwSOCKS5
|
static int |
fwTunnel
|
static int |
tmASCII
|
static int |
tmBinary
|
static int |
tmDefault
|
Constructor Summary | |
Ftp()
|
Method Summary | |
void |
abort()
Abort Current Upload/Download. |
void |
addFtpEventListener(FtpEventListener l)
|
void |
append()
Append data from LocalFile to a remote file RemoteFile on an FTP server. |
void |
deleteFile()
Delete RemoteFile from an FTP server. |
void |
download()
Download a RemoteFile from an FTP server. |
void |
fireDirList(java.lang.String dirEntry,
java.lang.String fileName,
boolean isDir,
int fileSize,
java.lang.String fileTime)
Fired when a directory entry is received. |
void |
fireEndTransfer()
Fired when a file completes downloading/uploading. |
void |
fireError(int errorCode,
java.lang.String description)
Information about errors during data delivery. |
void |
firePITrail(int direction,
java.lang.String message)
Traces the commands sent to the server, and the respective replies. |
void |
fireStartTransfer()
Fired when a file starts downloading/uploading. |
void |
fireTransfer(int bytesTransferred,
byte[] text)
Fired during file download/upload. |
int |
getAction()
An action code for the component. |
java.lang.String |
getAltFile()
The new name for RemoteFile when Action is set to Rename . |
byte[] |
getFirewallData()
Used to send other data to firewall. |
java.lang.String |
getFirewallHost()
Name or IP address of firewall (optional). |
java.lang.String |
getFirewallPassword()
A password if authentication is to be used connecting through the firewall. |
int |
getFirewallPort()
Port of the firewall to connect to. |
int |
getFirewallType()
Determines the type of firewall to connect through. |
java.lang.String |
getFirewallUser()
A user name if authentication is to be used connecting through a firewall. |
java.lang.String |
getLastReply()
The last reply from the server. |
java.lang.String |
getLocalFile()
The path to a local file for download/upload. |
java.lang.String |
getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
java.lang.String |
getPassword()
The password to login with. |
java.lang.String |
getRemoteFile()
The name of the remote file for uploading/downloading. |
java.lang.String |
getRemoteHost()
The domain name or IP address of the FTP server. |
java.lang.String |
getRemotePath()
The current path in the FTP server. |
int |
getRemotePort()
The port for the FTP service (default is 21). |
java.lang.String |
getStartByte()
The byte index in RemoteFile and LocalFile where to start the transmission. |
int |
getTimeout()
A timeout for the component. |
int |
getTransferMode()
The transfer mode (ASCII or Binary). |
java.lang.String |
getUser()
The user id to login as. |
void |
interrupt()
Interrupt the Action in progress (if any). |
boolean |
isConnected()
Shows whether the component is connected. |
boolean |
isPassive()
Controls whether to direct the server into passive mode especially if behind a firewall. |
void |
listDirectory()
List the current directory specified by RemotePath on an FTP server. |
void |
listDirectoryLong()
List extended directory information for RemotePath . |
void |
logoff()
Logoff from the FTP server by posting a QUIT command. |
void |
logon()
Logon to the FTP server using the current User and Password . |
void |
makeDirectory()
Create a directory on an FTP server. |
void |
removeDirectory()
Remove a directory specified by RemoteFile from an FTP server. |
void |
removeFtpEventListener(FtpEventListener l)
|
void |
renameFile()
Change the name of RemoteFile to AltFile on an FTP server. |
void |
setAction(int action)
An action code for the component. |
void |
setAltFile(java.lang.String altFile)
The new name for RemoteFile when Action is set to Rename . |
void |
setCommand(java.lang.String command)
Can be used to send additional commands directly to the FTP server. |
void |
setFirewallData(byte[] firewallData)
Used to send other data to firewall. |
void |
setFirewallHost(java.lang.String firewallHost)
Name or IP address of firewall (optional). |
void |
setFirewallPassword(java.lang.String firewallPassword)
A password if authentication is to be used connecting through the firewall. |
void |
setFirewallPort(int firewallPort)
Port of the firewall to connect to. |
void |
setFirewallType(int firewallType)
Determines the type of firewall to connect through. |
void |
setFirewallUser(java.lang.String firewallUser)
A user name if authentication is to be used connecting through a firewall. |
void |
setLocalFile(java.lang.String localFile)
The path to a local file for download/upload. |
void |
setLocalHost(java.lang.String localHost)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
void |
setPassive(boolean passive)
Controls whether to direct the server into passive mode especially if behind a firewall. |
void |
setPassword(java.lang.String password)
The password to login with. |
void |
setRemoteFile(java.lang.String remoteFile)
The name of the remote file for uploading/downloading. |
void |
setRemoteHost(java.lang.String remoteHost)
The domain name or IP address of the FTP server. |
void |
setRemotePath(java.lang.String remotePath)
The current path in the FTP server. |
void |
setRemotePort(int remotePort)
The port for the FTP service (default is 21). |
void |
setStartByte(java.lang.String startByte)
The byte index in RemoteFile and LocalFile where to start the transmission. |
void |
setTimeout(int timeout)
A timeout for the component. |
void |
setTransferMode(int transferMode)
The transfer mode (ASCII or Binary). |
void |
setUser(java.lang.String user)
The user id to login as. |
void |
storeUnique()
Upload a file with a Unique Name to an FTP server. |
void |
upload()
Upload a file specified by LocalFile to an FTP server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ftpIdle
public static final int ftpAbort
public static final int ftpLogon
public static final int ftpLogoff
public static final int ftpDownload
public static final int ftpUpload
public static final int ftpDeleteFile
public static final int ftpRenameFile
public static final int ftpListDirectory
public static final int ftpListDirectoryLong
public static final int ftpMakeDirectory
public static final int ftpRemoveDirectory
public static final int ftpAppend
public static final int ftpStoreUnique
public static final int fwNone
public static final int fwTunnel
public static final int fwSOCKS4
public static final int fwSOCKS5
public static final int tmDefault
public static final int tmASCII
public static final int tmBinary
Constructor Detail |
public Ftp()
Method Detail |
public int getAction()
Action
property to a valid action code makes
the control perform the associated action. If the action completes
successfully, execution continues normally, and Action
is
reset to 0 (Idle). If an error happens, then
an IPWorksException exception is raised.
The following are the possible values for the Action
property
and the corresponding descriptions:
User
and Password
. If TransferMode
is not 0 (Default), then the FTP transfer mode is set to
the appropriate value.
RemoteFile
is downloaded to the local file specified
by LocalFile
, or it is retrieved through the Transfer
event,
if the LocalFile
property is "" (empty string). RemoteFile
is either an absolute path on the server,
or a path relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon .
LocalFile
is uploaded to the remote file specified
by RemoteFile
. RemoteFile
is either an absolute path on the server, or a path
relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon . Check also the ftpAppend action for appending
a file to the server.
RemoteFile
are deleted. RemoteFile
is either
an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is changed to the
value of AltFile
. RemoteFile
and AltFile
are either absolute paths on the server, or a path relative to RemotePath
.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Only file names are returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Extended file information is returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is created on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is deleted on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
LocalFile
is appended
to RemoteFile
on the server as opposed to replacing it as done by the ftpUpload action. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The server will create a file with that name if it doesn't already exist (similar to Upload). If there is
no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
LocalFile
to be saved on the current directory given
by RemotePath
. The server includes the new name of the file in
its response. The user should check the PITrail
event,
or LastReply
property to retrieve this generated filename.
public void setAction(int action) throws IPWorksException
Action
property to a valid action code makes
the control perform the associated action. If the action completes
successfully, execution continues normally, and Action
is
reset to 0 (Idle). If an error happens, then
an IPWorksException exception is raised.
The following are the possible values for the Action
property
and the corresponding descriptions:
User
and Password
. If TransferMode
is not 0 (Default), then the FTP transfer mode is set to
the appropriate value.
RemoteFile
is downloaded to the local file specified
by LocalFile
, or it is retrieved through the Transfer
event,
if the LocalFile
property is "" (empty string). RemoteFile
is either an absolute path on the server,
or a path relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon .
LocalFile
is uploaded to the remote file specified
by RemoteFile
. RemoteFile
is either an absolute path on the server, or a path
relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon . Check also the ftpAppend action for appending
a file to the server.
RemoteFile
are deleted. RemoteFile
is either
an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is changed to the
value of AltFile
. RemoteFile
and AltFile
are either absolute paths on the server, or a path relative to RemotePath
.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Only file names are returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Extended file information is returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is created on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
RemoteFile
is deleted on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
LocalFile
is appended
to RemoteFile
on the server as opposed to replacing it as done by the ftpUpload action. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The server will create a file with that name if it doesn't already exist (similar to Upload). If there is
no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
LocalFile
to be saved on the current directory given
by RemotePath
. The server includes the new name of the file in
its response. The user should check the PITrail
event,
or LastReply
property to retrieve this generated filename.
public java.lang.String getAltFile()
Action
property for more information.
public void setAltFile(java.lang.String altFile) throws IPWorksException
Action
property for more information.
public void setCommand(java.lang.String command) throws IPWorksException
LastReply
property and/or trap the PITrail
events
comming from the server to get the response.
public boolean isConnected()
public byte[] getFirewallData()
public void setFirewallData(byte[] firewallData) throws IPWorksException
public java.lang.String getFirewallHost()
FirewallHost
is given, requested connections will be
authenticated through the specified firewall when connecting.
If the FirewallHost
property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the FirewallHost
property is set to the corresponding address. If the
search is not successful, an error is returned.
public void setFirewallHost(java.lang.String firewallHost) throws IPWorksException
FirewallHost
is given, requested connections will be
authenticated through the specified firewall when connecting.
If the FirewallHost
property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the FirewallHost
property is set to the corresponding address. If the
search is not successful, an error is returned.
public java.lang.String getFirewallPassword()
FirewallHost
is specified, the FirewallUser
and FirewallPassword
properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public void setFirewallPassword(java.lang.String firewallPassword) throws IPWorksException
FirewallHost
is specified, the FirewallUser
and FirewallPassword
properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public int getFirewallPort()
FirewallHost
. See the
description of the FirewallHost
property for
details.
Note that the FirewallPort
is set automatically
when FirewallType
is set to a valid value. See the
description of the FirewallType
property for
details.
public void setFirewallPort(int firewallPort) throws IPWorksException
FirewallHost
. See the
description of the FirewallHost
property for
details.
Note that the FirewallPort
is set automatically
when FirewallType
is set to a valid value. See the
description of the FirewallType
property for
details.
public int getFirewallType()
FirewallPort
is set to 80.
FirewallPort
is set to 1080.
FirewallPort
is set to 1080.
public void setFirewallType(int firewallType) throws IPWorksException
FirewallPort
is set to 80.
FirewallPort
is set to 1080.
FirewallPort
is set to 1080.
public java.lang.String getFirewallUser()
FirewallHost
is specified, the FirewallUser
and FirewallPassword
properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public void setFirewallUser(java.lang.String firewallUser) throws IPWorksException
FirewallHost
is specified, the FirewallUser
and FirewallPassword
properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public java.lang.String getLastReply()
PITrail
event.
public java.lang.String getLocalFile()
LocalFile
property is used by the Upload and ftpDownload actions. See the description of the Action
property for more information.
public void setLocalFile(java.lang.String localFile) throws IPWorksException
LocalFile
property is used by the Upload and ftpDownload actions. See the description of the Action
property for more information.
public java.lang.String getLocalHost()
LocalHost
property contains the name of the local host
as obtained by the gethostname() Winsock call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.
If the control is connected, the LocalHost
property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost
is not persistent. You must always set it in
code, and never in the property window.
public void setLocalHost(java.lang.String localHost) throws IPWorksException
LocalHost
property contains the name of the local host
as obtained by the gethostname() Winsock call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.
If the control is connected, the LocalHost
property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost
is not persistent. You must always set it in
code, and never in the property window.
public boolean isPassive()
public void setPassive(boolean passive) throws IPWorksException
public java.lang.String getPassword()
public void setPassword(java.lang.String password) throws IPWorksException
public java.lang.String getRemoteFile()
RemoteFile
is either an absolute file path,
or a relative path based on RemotePath
.
A number of actions use RemoteFile
as an argument.
See the description of the Action
property for
more information.
public void setRemoteFile(java.lang.String remoteFile) throws IPWorksException
RemoteFile
is either an absolute file path,
or a relative path based on RemotePath
.
A number of actions use RemoteFile
as an argument.
See the description of the Action
property for
more information.
public java.lang.String getRemoteHost()
RemoteHost
property specifies the IP address (IP number in
dotted internet format) or Domain Name of the FTP server.
It is set before a connection is attempted and cannot be changed
once a connection is in progress.
If the RemoteHost
property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the RemoteHost
property is set to the corresponding address. If the
search is not successful, an error is returned.
public void setRemoteHost(java.lang.String remoteHost) throws IPWorksException
RemoteHost
property specifies the IP address (IP number in
dotted internet format) or Domain Name of the FTP server.
It is set before a connection is attempted and cannot be changed
once a connection is in progress.
If the RemoteHost
property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the RemoteHost
property is set to the corresponding address. If the
search is not successful, an error is returned.
public java.lang.String getRemotePath()
RemotePath
shows the current working directory
on the FTP server. It can also be used to change the
working directory by setting it to an absolute directory
path, or a relative path with respect to the existing
value of RemotePath
.
If the first two characters of the new path are "..", then a change to one level above in the directory tree is performed.
Setting RemotePath
causes the control to sent
the appropriate command to the remote server only
if connected.
public void setRemotePath(java.lang.String remotePath) throws IPWorksException
RemotePath
shows the current working directory
on the FTP server. It can also be used to change the
working directory by setting it to an absolute directory
path, or a relative path with respect to the existing
value of RemotePath
.
If the first two characters of the new path are "..", then a change to one level above in the directory tree is performed.
Setting RemotePath
causes the control to sent
the appropriate command to the remote server only
if connected.
public int getRemotePort()
RemotePort
while
connected will fail with an error.
public void setRemotePort(int remotePort) throws IPWorksException
RemotePort
while
connected will fail with an error.
public java.lang.String getStartByte()
StartByte
contains a zero-based index in both RemoteFile
and LocalFile
that determines the point where the transmission of data starts from.
This is useful for resuming interrupted downloads and uploads of files from FTP servers.
Once set, the StartByte
index is used for all future downloads/uploads. The property must
be reset to "0" for normal downloads/uploads.
The type of the property is a string instead of numeric to allow for certain implementations that expect an alphanumeric marker of the start index.
In the Transfer
event, the TransferredBytes parameter will include the bytes
skipped (i.e. it will show StartByte
more bytes than actually transferred).
NOTE: some FTP servers may not support the FTP 'REST' command. If that is the case
with the server you are accessing, you will not be able to use the StartByte
property.
public void setStartByte(java.lang.String startByte) throws IPWorksException
StartByte
contains a zero-based index in both RemoteFile
and LocalFile
that determines the point where the transmission of data starts from.
This is useful for resuming interrupted downloads and uploads of files from FTP servers.
Once set, the StartByte
index is used for all future downloads/uploads. The property must
be reset to "0" for normal downloads/uploads.
The type of the property is a string instead of numeric to allow for certain implementations that expect an alphanumeric marker of the start index.
In the Transfer
event, the TransferredBytes parameter will include the bytes
skipped (i.e. it will show StartByte
more bytes than actually transferred).
NOTE: some FTP servers may not support the FTP 'REST' command. If that is the case
with the server you are accessing, you will not be able to use the StartByte
property.
public int getTimeout()
Timeout
property is set to 0 (default value) all actions
will run uninterrupted until succesful completion, or an error condition
is encountered.
If Timeout
is set to a positive value, and any action does not
complete within Timeout
seconds, the action is aborted, and a 'Timeout' error is fired..
The control will use DoEvents
to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and always remains responsive.
public void setTimeout(int timeout) throws IPWorksException
Timeout
property is set to 0 (default value) all actions
will run uninterrupted until succesful completion, or an error condition
is encountered.
If Timeout
is set to a positive value, and any action does not
complete within Timeout
seconds, the action is aborted, and a 'Timeout' error is fired..
The control will use DoEvents
to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and always remains responsive.
public int getTransferMode()
TransferMode
property are as follows:
public void setTransferMode(int transferMode) throws IPWorksException
TransferMode
property are as follows:
public java.lang.String getUser()
public void setUser(java.lang.String user) throws IPWorksException
public void fireDirList(java.lang.String dirEntry, java.lang.String fileName, boolean isDir, int fileSize, java.lang.String fileTime)
FtpDirListEvent
public void fireEndTransfer()
FtpEndTransferEvent
public void fireError(int errorCode, java.lang.String description)
FtpErrorEvent
public void firePITrail(int direction, java.lang.String message)
FtpPITrailEvent
public void fireStartTransfer()
FtpStartTransferEvent
public void fireTransfer(int bytesTransferred, byte[] text)
FtpTransferEvent
public void abort() throws IPWorksException
Calling this method is equivalent to setting the Action
property
to ftpAbort .
public void append() throws IPWorksException
LocalFile
is appended
to RemoteFile
on the server as opposed to replacing it as done by the ftpUpload action. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The server will create a file with that name if it doesn't already exist (similar to Upload). If there is
no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpAppend .
public void deleteFile() throws IPWorksException
RemoteFile
are deleted. RemoteFile
is either
an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpDeleteFile .
public void download() throws IPWorksException
RemoteFile
is downloaded to the local file specified
by LocalFile
, or it is retrieved through the Transfer
event,
if the LocalFile
property is "" (empty string). RemoteFile
is either an absolute path on the server,
or a path relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpDownload .
public void interrupt() throws IPWorksException
Action
property
to Idle (0) .
public void listDirectory() throws IPWorksException
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Only file names are returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpListDirectory .
public void listDirectoryLong() throws IPWorksException
RemoteFile
. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
.
The file listing is received through the DirList
event.
Extended file information is returned.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpListDirectoryLong .
public void logoff() throws IPWorksException
Calling this method is equivalent to setting the Action
property
to ftpLogoff .
public void logon() throws IPWorksException
User
and Password
. If TransferMode
is not 0 (Default), then the FTP transfer mode is set to
the appropriate value.
Calling this method is equivalent to setting the Action
property
to ftpLogon .
public void makeDirectory() throws IPWorksException
RemoteFile
is created on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpMakeDirectory .
public void removeDirectory() throws IPWorksException
RemoteFile
is deleted on the FTP server. RemoteFile
is either an absolute path on the server, or a path relative to RemotePath
. If there is no
FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpRemoveDirectory .
public void renameFile() throws IPWorksException
RemoteFile
is changed to the
value of AltFile
. RemoteFile
and AltFile
are either absolute paths on the server, or a path relative to RemotePath
.
If there is no FTP session in place, one is automatically created by first setting Action
to ftpLogon .
Calling this method is equivalent to setting the Action
property
to ftpRenameFile .
public void storeUnique() throws IPWorksException
LocalFile
to be saved on the current directory given
by RemotePath
. The server includes the new name of the file in
its response. The user should check the PITrail
event,
or LastReply
property to retrieve this generated filename.
Calling this method is equivalent to setting the Action
property
to ftpStoreUnique .
public void upload() throws IPWorksException
LocalFile
is uploaded to the remote file specified
by RemoteFile
. RemoteFile
is either an absolute path on the server, or a path
relative to RemotePath
. If there is no FTP session in place, one is automatically
created by first setting Action
to ftpLogon . Check also the ftpAppend action for appending
a file to the server.
Calling this method is equivalent to setting the Action
property
to ftpUpload .
public void addFtpEventListener(FtpEventListener l) throws java.util.TooManyListenersException
public void removeFtpEventListener(FtpEventListener l)
|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |