Plasma GitLab Archive
Projects Blog Knowledge

Class type Ftp_client.ftp_client_pi

class type ftp_client_pi = object .. end
The client protocol interpreter...

method exec_e : ?prelim:(ftp_state -> reply -> unit) ->
cmd -> (ftp_state * reply) Uq_engines.engine
Run another command as engine. The command is first started when the previous command has terminated. The protocol interpreter does not check whether this command is allowed in the current ftp_state or not.

When the command is done, the engine transitions to `Done(st,r) where st is the state after the command, and r is the final reply of the server.

Due to the FTP specification there may be several replies for a command: First, zero or more replies with cmd_state = `Preliminary, and then exactly one reply with a final state. The preliminary replies can be intercepted with the prelim callback.

method send_abort : unit -> unit
Sends immediately an ABOR command, even when a data transfer is in progress.

TODO - not yet implemented

method run : unit -> unit
Starts the event system; same as Unixqueue.run
method ftp_state : ftp_state
Returns the current ftp_state
method state : unit Uq_engines.engine_state
The state in the sense of Uq_engines. Possible values are:
  • `Working _: The control connection is still active. The int argument is currently meaningless.
  • `Done(): The control connection has been terminated.
  • `Error e: A violation of the FTP protocol happened, or another exception e occurred
  • `Aborted: The abort method was called

method abort : unit -> unit
Shuts any active connection immediately down, and changes the state of the engine to `Aborted.
method event_system : Unixqueue.event_system
The used event system
method request_notification : (unit -> bool) -> unit
method is_empty : bool
Whether the queue is empty
method need_ip6 : bool
Whether `EPSV or `EPRT are required instead of `PASV and `PORT, respectively. This is first set after connecting to a server (i.e. when the IP address family is known). Before, it is always false.

Feature tests

The following methods are first set when the `FEAT command is run. Use feat_method to do so. Until then, always false is returned.

method supports_tvfs : bool
Whether TVFS filenames are supported
method supports_mdtm : bool
Whether the `MDTM command is supported. Note that `MDTM is sometimes even supported even if the server does not provide the `FEAT command to test for this feature.
method supports_size : bool
Whether the `SIZE command is supported. Note that `SIZE is sometimes even supported even if the server does not provide the `FEAT command to test for this feature.
method supports_mlst : bool
Whether the `MLST and `MLSD commands are supported
method mlst_facts : string list
All available facts for `MLST and `MLSD
method mlst_enabled_facts : string list
The enabled facts for `MLST and `MLSD
method supports_utf8 : bool
Whether the UTF-8 extension is understood by the server (RFC 2640)
method supports_tls : bool
Whether TLS is supported
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml