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

  • Abor

    Abort an active file transfer

  • Appe(String)

    Append to file

  • Auth

    Set auth to TLS

  • ClearCommandChannel

    Ask server not to encrypt command channel

  • Cdup

    Change 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

  • Epsv
  • Feat

    RFC 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

  • Noop

    Ping 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

  • Pasv

    Passive 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

  • Pwd

    Print working directory

  • Quit

    Quit

  • 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

  • Set transfer file type

  • User(String)

    Provide user to login as

  • Custom(String)

    Custom command

IP version; argument for Eprt command

pub type IpVersion {
  V4
  V6
}

Constructors

  • V4
  • V6

Values

pub fn to_string(command: Command) -> String
Search Document