public enum FtpCommandCode extends Enum<FtpCommandCode>
Enum Constant and Description |
---|
ABOR
This command tells the server to abort the previous FTP service command and any associated
transfer of data.
|
ACCT
The argument field is a Telnet string identifying the user's account.
|
ALLO
This command may be required by some servers to reserve sufficient storage to accommodate the
new file to be transferred.
|
APPE
This command causes the server-DTP to accept the data transferred via the data connection and
to store the data in a file at the server site.
|
AUTH
Security Association Setup AUTH TLS (Control) or AUTH SSL (Control and Data)
234* 502, 504, 534*, 431* 500, 501, 421 AUTH TLS -> 234 -> USER or ([PBSZ 0] PROT P then USER) -> 2xy |
CCC
Security Association Setup
CCC (Control SSL Off) 200 500, 533*, 534* |
CDUP
This command is a special case of CWD, and is included to simplify the implementation of
programs for transferring directory trees between operating systems having different syntaxes
for naming the parent directory.
|
Connection
Command to simulate the beginning of a connection in order to force the authentication step.
|
CWD
This command allows the user to work with a different directory or dataset for file storage
or retrieval without altering his login or accounting information.
|
DELE
This command causes the file specified in the pathname to be deleted at the server site.
|
EPRT
The EPRT command allows for the specification of an extended address for the data connection.
|
EPSV
The EPSV command requests that a server listen on a data port and wait for a connection.
|
FEAT
The FEAT command consists solely of the word "FEAT".
|
HELP
This command shall cause the server to send helpful information regarding its implementation
status over the control connection to the user.
|
IncorrectSequence
Bad sequence of commands
Always return 503 |
INTERNALSHUTDOWN
Shutdown command (internal password protected command).
|
LIMITBANDWIDTH
Change the Limit of the global bandwidth.
|
LIST
This command causes a list to be sent from the server to the passive DTP.
|
MDTM
The FTP command, MODIFICATION TIME (MDTM), can be used to determine when a file in the server
NVFS was last modified.
|
MKD
This command causes the directory specified in the pathname to be created as a directory (if
the pathname is absolute) or as a subdirectory of the current working directory (if the
pathname is relative).
|
MLSD
The MLSD command is intended to standardize the file and directory information returned by
the server-FTP process.
|
MLST
The MLST command is intended to standardize the file and directory information returned by
the server-FTP process.
|
MODE
The argument is a single Telnet character code specifying the data transfer modes described
in the Section on Transmission Modes.
|
NLST
This command causes a directory listing to be sent from server to user site.
|
NOOP
This command does not affect any parameters or previously entered commands.
|
OPTS
The OPTS (options) command allows a user-PI to specify the desired behavior of a server-FTP
process when another FTP command (the target command) is later issued.
|
PASS
The argument field is a Telnet string specifying the user's password.
|
PASV
This command requests the server-DTP to "listen" on a data port (which is not its default
data port) and to wait for a connection rather than initiate one upon receipt of a transfer
command.
|
PBSZ
Data protection negotiation commands
PBSZ 0 200 503, 500, 501, 421, 530 |
PORT
The argument is a HOST-PORT specification for the data port to be used in data connection.
|
PROT
Data protection negotiation commands
PROT P (Data) PROT C (Data SSL Off) 200 504, 536*, 503, 534*, 431* 500, 501, 421, 530 |
PWD
This command causes the name of the current working directory to be returned in the reply.
|
QUIT
This command terminates a USER and if file transfer is not in progress, the server closes the
control connection.
|
REIN
This command terminates a USER, flushing all I/O and account information, except to allow any
transfer in progress to be completed.
|
REST
The argument field represents the server marker at which file transfer is to be restarted.
|
RETR
This command causes the server-DTP to transfer a copy of the file, specified in the pathname,
to the server- or user-DTP at the other end of the data connection.
|
RMD
This command causes the directory specified in the pathname to be removed as a directory (if
the pathname is absolute) or as a subdirectory of the current working directory (if the
pathname is relative).
|
RNFR
This command specifies the old pathname of the file which is to be renamed.
|
RNTO
This command specifies the new pathname of the file specified in the immediately preceding
"rename from" RNFR command.
|
SITE
This command is used by the server to provide services specific to his system that are
essential to file transfer but not sufficiently universal to be included as commands in the
protocol.
|
SIZE
The FTP command, SIZE OF FILE (SIZE), is used to obtain the transfer size of a file from the
server-FTP process.
|
SMNT
This command allows the user to mount a different file system data structure without altering
his login or accounting information.
|
STAT
This command shall cause a status response to be sent over the control connection in the form
of a reply.
|
STOR
This command causes the server-DTP to accept the data transferred via the data connection and
to store the data as a file at the server site.
|
STOU
This command behaves like STOR except that the resultant file is to be created in the current
directory under a name unique to that directory.
|
STRU
The argument is a single Telnet character code specifying file structure described in the
Section on Data Representation and Storage.
|
SYST
This command is used to find out the type of operating system at the server.
|
TYPE
The argument specifies the representation type as described in the Section on Data
Representation and Storage.
|
Unimplemented
Unimplemented command
Always return 502 |
Unknown
Unknown Command from control network
Always return 500 |
USER
The argument field is a Telnet string identifying the user.
|
XCRC
Compute CRC on pathname given as argument.
|
XCUP
Change to the parent of the current working directory.
|
XCWD
Change to a new working directory.
|
XMD5
Compute MD5 on pathname given as argument.
|
XMKD
Make a directory.
|
XPWD
Print the current working directory.
|
XRMD
Remove the directory.
|
XSHA1
Compute SHA-1 on pathname given as argument.
|
Modifier and Type | Field and Description |
---|---|
Class<? extends AbstractCommand> |
command
The Class that implements this command
|
Class<?>[] |
nextValids
Next valids class that could follow this command (null means any)
|
Class<? extends AbstractCommand> |
previousValid
Previous positive class that must precede this command (null means any)
|
Modifier and Type | Method and Description |
---|---|
static AbstractCommand |
getFromLine(FtpSession session,
String line)
Get the corresponding AbstractCommand object from the line received from the client
associated with the handler
|
static boolean |
isDataConnectionUsageCommand(FtpCommandCode command)
True if the command is using a Data connection
|
static boolean |
isExtensionCommand(FtpCommandCode command)
True if the command is an extension operation (XMD5, XCRC, XSHA1, ...)
|
static boolean |
isListLikeCommand(FtpCommandCode command)
True if the command is a List like operation (LIST, NLST, MLSD, MLST, ...)
|
static boolean |
isRetrLikeCommand(FtpCommandCode command)
True if the command is a Retrieve like operation (RETR, ...)
|
static boolean |
isSpecialCommand(FtpCommandCode command)
True if the command is a special operation (QUIT, ABOR, NOOP, STAT, ...)
|
static boolean |
isSslOrAuthCommand(FtpCommandCode command)
True if the command is Ssl related (AUTH, PBSZ, PROT, USER, PASS, ACCT)
|
static boolean |
isStoreLikeCommand(FtpCommandCode command)
True if the command is a Store like operation (APPE, STOR, STOU, ...)
|
static boolean |
isStorOrRetrLikeCommand(FtpCommandCode command)
True if the command is a Retrieve or Store like operation
|
String |
toString() |
static FtpCommandCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FtpCommandCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FtpCommandCode Connection
public static final FtpCommandCode USER
public static final FtpCommandCode PASS
public static final FtpCommandCode ACCT
public static final FtpCommandCode CWD
public static final FtpCommandCode CDUP
public static final FtpCommandCode SMNT
public static final FtpCommandCode REIN
public static final FtpCommandCode QUIT
public static final FtpCommandCode PORT
PORT h1,h2,h3,h4,p1,p2where h1 is the high order 8 bits of the internet host address.
public static final FtpCommandCode PASV
public static final FtpCommandCode TYPE
<SP>
(Space, ASCII code 32).\ / A - ASCII | | N - Non-print |-><-| T - Telnet format effectors E - EBCDIC| | C - Carriage Control (ASA) / \ I - Image L <byte size> - Local byte Byte sizeThe default representation type is ASCII Non-print. If the Format parameter is changed, and later just the first argument is changed, Format then returns to the Non-print default.
public static final FtpCommandCode STRU
F - FtpFile (no record structure) R - Record structure P - Page structureThe default structure is FtpFile.
public static final FtpCommandCode MODE
S - Stream B - Block C - CompressedThe default transfer mode is Stream.
public static final FtpCommandCode RETR
public static final FtpCommandCode STOR
public static final FtpCommandCode STOU
public static final FtpCommandCode APPE
public static final FtpCommandCode ALLO
<SP>
R <SP>
. This command shall
be followed by a STORe or APPEnd command. The ALLO command should be treated as a NOOP (no
operation) by those servers which do not require that the maximum size of the file be
declared beforehand, and those servers interested in only the maximum record or page size
should accept a dummy value in the first argument and ignore it.public static final FtpCommandCode REST
FtpFile
restartMarker
method.public static final FtpCommandCode RNFR
public static final FtpCommandCode RNTO
public static final FtpCommandCode ABOR
public static final FtpCommandCode DELE
public static final FtpCommandCode RMD
public static final FtpCommandCode MKD
public static final FtpCommandCode PWD
public static final FtpCommandCode LIST
public static final FtpCommandCode NLST
<CRLF>
or <NL>
.
(Again the user must ensure that the TYPE is correct.) This command is intended to return
information that can be used by a program to further process the files automatically. For
example, in the implementation of a "multiple get" function.public static final FtpCommandCode SITE
public static final FtpCommandCode SYST
public static final FtpCommandCode STAT
public static final FtpCommandCode HELP
public static final FtpCommandCode NOOP
public static final FtpCommandCode XCWD
public static final FtpCommandCode XCUP
public static final FtpCommandCode XRMD
public static final FtpCommandCode XMKD
public static final FtpCommandCode XPWD
public static final FtpCommandCode MDTM
public static final FtpCommandCode SIZE
public static final FtpCommandCode MLSD
public static final FtpCommandCode MLST
public static final FtpCommandCode FEAT
feat-response = error-response / no-features / feature-listing no-features = "211" SP *TCHAR CRLF feature-listing = "211-" *TCHAR CRLF 1*( SP feature CRLF ) "211 End" CRLF feature = feature-label [ SP feature-parms ] feature-label = 1*VCHAR feature-parms = 1*TCHARNote that each feature line in the feature-listing begins with a single space. That space is not optional, nor does it indicate general white space. This space guarantees that the feature line can never be misinterpreted as the end of the feature-listing, but is required even where there is no possibility of ambiguity.
public static final FtpCommandCode OPTS
public static final FtpCommandCode EPRT
EPRT<space><d><net-prt><d><net-addr><d><tcp-port><d>
<d>
) MUST be specified. The delimiter character
MUST be one of the ASCII characters in range 33-126 inclusive. The character "|" (ASCII 124)
is recommended unless it coincides with a character needed to encode the network address.<net-prt>
argument MUST be an address family number defined by IANA in
the latest Assigned Numbers RFC (RFC 1700 [RP94] as of the writing of this document). This
number indicates the protocol to be used (and, implicitly, the address length). This document
will use two of address family numbers from [RP94] as examples, according to the following
table:AF Number Protocol --------- -------- 1 Internet Protocol, Version 4 [Pos81a] 2 Internet Protocol, Version 6 [DH96]
<net-addr>
is a protocol specific string representation of the network
address. For the two address families specified above (AF Number 1 and 2), addresses MUST be
in the following format:AF Number Address Format Example --------- -------------- ------- 1 dotted decimal 132.235.1.2 2 IPv6 string 1080::8:800:200C:417A representations defined in [HD96]
<tcp-port>
argument must be the string representation of the number of
the TCP port on which the host is listening for the data connection.public static final FtpCommandCode EPSV
2yz Positive Completion x2z Connections xy9 Extended Passive Mode Entered
<text indicating server is entering extended passive mode> (<d><d><d><tcp-port><d>)
Entering Extended Passive Mode (|||6446|)
EPSV<space><net-prt>
EPSV < space > ALL
public static final FtpCommandCode XCRC
public static final FtpCommandCode XMD5
public static final FtpCommandCode XSHA1
public static final FtpCommandCode Unknown
public static final FtpCommandCode Unimplemented
public static final FtpCommandCode IncorrectSequence
public static final FtpCommandCode INTERNALSHUTDOWN
public static final FtpCommandCode LIMITBANDWIDTH
public static final FtpCommandCode AUTH
public static final FtpCommandCode CCC
public static final FtpCommandCode PROT
public static final FtpCommandCode PBSZ
public Class<? extends AbstractCommand> command
public Class<? extends AbstractCommand> previousValid
public Class<?>[] nextValids
public static FtpCommandCode[] values()
for (FtpCommandCode c : FtpCommandCode.values()) System.out.println(c);
public static FtpCommandCode 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 nullpublic static AbstractCommand getFromLine(FtpSession session, String line)
session
- line
- public static boolean isStoreLikeCommand(FtpCommandCode command)
command
- public static boolean isRetrLikeCommand(FtpCommandCode command)
command
- public static boolean isStorOrRetrLikeCommand(FtpCommandCode command)
command
- public static boolean isListLikeCommand(FtpCommandCode command)
command
- public static boolean isDataConnectionUsageCommand(FtpCommandCode command)
command
- public static boolean isSpecialCommand(FtpCommandCode command)
command
- public static boolean isSslOrAuthCommand(FtpCommandCode command)
command
- public static boolean isExtensionCommand(FtpCommandCode command)
command
- public String toString()
toString
in class Enum<FtpCommandCode>
Copyright © 2009–2019 Waarp. All rights reserved.