public static enum FtpRemoteFileTemplate.ExistsMode extends Enum<FtpRemoteFileTemplate.ExistsMode>
FtpRemoteFileTemplate.exists(String)
operation mode.Enum Constant and Description |
---|
NLST
Perform the
NLST FTP command. |
NLST_AND_DIRS
Perform the
NLST FTP command and fall back to
FTPClient.changeWorkingDirectory(String) . |
STAT
Perform the
STAT FTP command. |
Modifier and Type | Method and Description |
---|---|
static FtpRemoteFileTemplate.ExistsMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FtpRemoteFileTemplate.ExistsMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FtpRemoteFileTemplate.ExistsMode STAT
STAT
FTP command.
Default.public static final FtpRemoteFileTemplate.ExistsMode NLST
NLST
FTP command.
Used as default internally by framework components for files only operations.public static final FtpRemoteFileTemplate.ExistsMode NLST_AND_DIRS
NLST
FTP command and fall back to
FTPClient.changeWorkingDirectory(String)
.
This technique is required when you want to check if a directory exists
and the server does not support STAT
- it requires 4 requests/replies.
If you are only checking for an existing file, NLST
is preferred
(unless STAT
is supported).
FtpSession.exists(String)
public static FtpRemoteFileTemplate.ExistsMode[] values()
for (FtpRemoteFileTemplate.ExistsMode c : FtpRemoteFileTemplate.ExistsMode.values()) System.out.println(c);
public static FtpRemoteFileTemplate.ExistsMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null