gftp/command
The set of FTP commands
Types
The Command type represents the different FTP commands that can be issued by the client.
Each command corresponds to a specific action that the FTP server can perform,
such as listing files, changing directories, or transferring files.
The Command type is designed to encapsulate all the necessary information for executing a command,
including any parameters or arguments that may be required.
pub type Command {
Abor
Appe(String)
Auth
ClearCommandChannel
Cdup
Cwd(String)
Dele(String)
Eprt(host: String, port: Int, ip_version: IpVersion)
Epsv
Feat
List(option.Option(String))
Mdtm(String)
Mlsd(option.Option(String))
Mlst(option.Option(String))
Mkd(String)
Nlst(option.Option(String))
Noop
Opts(String, option.Option(String))
Pass(String)
Pasv
Pbsz(Int)
Port(String)
Prot(protection_level.ProtectionLevel)
Pwd
Quit
RenameFrom(String)
RenameTo(String)
Rest(Int)
Retr(String)
Rmd(String)
Site(String)
Size(String)
Stor(String)
Type(file_type.FileType)
User(String)
Custom(String)
}
Constructors
-
AborAbort an active file transfer
-
Appe(String)Append to file
-
AuthSet auth to TLS
-
ClearCommandChannelAsk server not to encrypt command channel
-
CdupChange directory to parent directory
-
Cwd(String)Change working directory
-
Dele(String)Remove file at specified path
-
Eprt(host: String, port: Int, ip_version: IpVersion)Allows specification for protocol and address for data connections
-
EpsvExtended passive mode https://www.rfc-editor.org/rfc/rfc2428#section-3
-
FeatRFC 2389 https://www.rfc-editor.org/rfc/rfc2389 list supported options on the server
-
List(option.Option(String))List entries at specified path. If path is not provided list entries at current working directory
-
Mdtm(String)Get modification time for file at specified path
-
Mlsd(option.Option(String))Get the list of directories at specified path. If path is not provided list directories at current working directory
-
Mlst(option.Option(String))Get details of an individual file or directory at specified path
-
Mkd(String)Make directory
-
Nlst(option.Option(String))Get the list of file names at specified path. If path is not provided list entries at current working directory
-
NoopPing server
-
Opts(String, option.Option(String))RFC 2389 https://www.rfc-editor.org/rfc/rfc2389, Set option to server, syntax is (command-name, command-options)
-
Pass(String)Provide login password
-
PasvPassive mode
-
Pbsz(Int)Protection buffer size
-
Port(String)Specifies an address and port to which the server should connect (active mode)
-
Set protection level for protocol
-
PwdPrint working directory
-
QuitQuit
-
RenameFrom(String)Select file to rename
-
RenameTo(String)Rename selected file to
-
Rest(Int)Resume transfer from offset
-
Retr(String)Retrieve file
-
Rmd(String)Remove directory
-
Site(String)Site command
-
Size(String)Get file size of specified path
-
Stor(String)Put file at specified path
-
Type(file_type.FileType)Set transfer file type
-
User(String)Provide user to login as
-
Custom(String)Custom command