sig
exception FTP_error of exn
exception FTP_protocol_violation of string
exception FTP_timeout of string
exception GSSAPI_error of string
type cmd_state =
[ `Auth_data
| `Init
| `Not_connected
| `Pass_acct_seq
| `Perm_failure
| `Preliminary
| `Proto_error
| `Rename_seq
| `Restart_seq
| `Success
| `Temp_failure
| `User_acct_seq
| `User_pass_seq ]
type port =
[ `Active of string * int * Unix.file_descr
| `Ext_active of string * int * Unix.file_descr
| `Ext_passive of int
| `Passive of string * int
| `Unspecified ]
type form_code = [ `ASA | `Non_print | `Telnet ]
type representation =
[ `ASCII of Netftp_client.form_code option
| `EBCDIC of Netftp_client.form_code option
| `Image ]
type structure = [ `File_structure | `Record_structure ]
type transmission_mode = [ `Block_mode | `Stream_mode ]
type ftp_auth = [ `GSSAPI | `None | `TLS ]
type ftp_data_prot = [ `C | `E | `P | `S ]
type support_level = [ `If_possible | `None | `Required ]
type ftp_state = {
cmd_state : Netftp_client.cmd_state;
ftp_connected : bool;
ftp_data_conn : bool;
ftp_user : string option;
ftp_password : string option;
ftp_account : string option;
ftp_logged_in : bool;
ftp_host : string;
ftp_port : Netftp_client.port;
ftp_repr : Netftp_client.representation;
ftp_structure : Netftp_client.structure;
ftp_trans : Netftp_client.transmission_mode;
ftp_dir : string list;
ftp_features : (string * string option) list option;
ftp_options : (string * string option) list;
ftp_auth : Netftp_client.ftp_auth;
ftp_auth_data : string option;
ftp_data_prot : Netftp_client.ftp_data_prot;
ftp_data_pbsz : int;
ftp_prot : Netftp_data_endpoint.ftp_protector option;
}
type cmd =
[ `ACCT of string
| `ADAT of string
| `ALLO of int * int option
| `APPE of
string *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_sender)
| `AUTH of string
| `CDUP
| `CWD of string
| `Connect of string * int
| `DELE of string
| `Disconnect
| `Dummy
| `EPRT
| `EPSV of [ `AF of Unix.socket_domain | `ALL ] option
| `FEAT
| `HELP of string option
| `LANG of string option
| `LIST of
string option *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver)
| `MDTM of string
| `MKD of string
| `MLSD of
string option *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver)
| `MLST of string option
| `MODE of Netftp_client.transmission_mode
| `NLST of
string option *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver)
| `NOOP
| `OPTS of string * string option
| `PASS of string
| `PASV
| `PBSZ of int
| `PORT
| `PROT of Netftp_client.ftp_data_prot
| `PWD
| `QUIT
| `REIN
| `REST of string
| `RETR of
string *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver)
| `RMD of string
| `RNFR of string
| `RNTO of string
| `SITE of string
| `SIZE of string
| `SMNT of string
| `STAT of string option
| `STOR of
string *
(Netftp_client.ftp_state -> Netftp_data_endpoint.local_sender)
| `STOU of Netftp_client.ftp_state -> Netftp_data_endpoint.local_sender
| `STRU of Netftp_client.structure
| `SYST
| `Start_TLS of (module Netsys_crypto_types.TLS_CONFIG)
| `Start_protection of Netftp_data_endpoint.ftp_protector
| `TYPE of Netftp_client.representation
| `USER of string ]
type reply = int * string
class type ftp_client_pi =
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method exec_e :
?prelim:(Netftp_client.ftp_state -> Netftp_client.reply -> unit) ->
Netftp_client.cmd ->
(Netftp_client.ftp_state * Netftp_client.reply) Uq_engines.engine
method ftp_state : Netftp_client.ftp_state
method gssapi_props : Netsys_gssapi.client_props option
method is_empty : bool
method mlst_enabled_facts : string list
method mlst_facts : string list
method need_ip6 : bool
method request_notification : (unit -> bool) -> unit
method request_proxy_notification :
(unit Uq_engines.engine -> bool) -> unit
method run : unit -> unit
method send_abort : unit -> unit
method state : unit Uq_engines.engine_state
method supports_mdtm : bool
method supports_mlst : bool
method supports_size : bool
method supports_tls : bool
method supports_tvfs : bool
method supports_utf8 : bool
end
type ftp_method = Netftp_client.ftp_client_pi -> unit Uq_engines.engine
exception FTP_method_temp_failure of int * string
exception FTP_method_perm_failure of int * string
exception FTP_method_unexpected_reply of int * string
val connect_method :
host:string -> ?port:int -> unit -> Netftp_client.ftp_method
val login_method :
user:string ->
get_password:(unit -> string) ->
get_account:(unit -> string) -> unit -> Netftp_client.ftp_method
val quit_method : unit -> Netftp_client.ftp_method
val tls_method :
config:(module Netsys_crypto_types.TLS_CONFIG) ->
required:bool -> unit -> Netftp_client.ftp_method
val gssapi_method :
config:Netsys_gssapi.client_config ->
required:bool ->
(module Netsys_gssapi.GSSAPI) -> Netftp_client.ftp_method
val walk_method :
[ `Dir of string | `File of string | `Stay ] -> Netftp_client.ftp_method
type filename = [ `NVFS of string | `TVFS of string | `Verbatim of string ]
val get_method :
file:Netftp_client.filename ->
representation:Netftp_client.representation ->
store:(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver) ->
unit -> Netftp_client.ftp_method
val put_method :
?meth:[ `APPE | `STOR ] ->
file:Netftp_client.filename ->
representation:Netftp_client.representation ->
store:(Netftp_client.ftp_state -> Netftp_data_endpoint.local_sender) ->
unit -> Netftp_client.ftp_method
val invoke_method :
command:Netftp_client.cmd -> unit -> Netftp_client.ftp_method
val set_structure_method :
Netftp_client.structure -> Netftp_client.ftp_method
val set_mode_method :
Netftp_client.transmission_mode -> Netftp_client.ftp_method
val rename_method :
file_from:Netftp_client.filename ->
file_to:Netftp_client.filename -> unit -> Netftp_client.ftp_method
val mkdir_method : Netftp_client.filename -> Netftp_client.ftp_method
val rmdir_method : Netftp_client.filename -> Netftp_client.ftp_method
val delete_method : Netftp_client.filename -> Netftp_client.ftp_method
val list_method :
dir:Netftp_client.filename ->
representation:Netftp_client.representation ->
store:(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver) ->
unit -> Netftp_client.ftp_method
val nlst_method :
dir:Netftp_client.filename ->
representation:Netftp_client.representation ->
store:(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver) ->
unit -> Netftp_client.ftp_method
val parse_nlst_document : string -> string list
val mdtm_method :
file:Netftp_client.filename ->
process_result:(float -> unit) -> unit -> Netftp_client.ftp_method
val size_method :
file:Netftp_client.filename ->
representation:Netftp_client.representation ->
process_result:(int64 -> unit) -> unit -> Netftp_client.ftp_method
val feat_method :
?process_result:((string * string option) list -> unit) ->
unit -> Netftp_client.ftp_method
type entry = string * (string * string) list
val mlst_method :
file:Netftp_client.filename ->
process_result:(Netftp_client.entry list -> unit) ->
unit -> Netftp_client.ftp_method
val mlsd_method :
dir:Netftp_client.filename ->
store:(Netftp_client.ftp_state -> Netftp_data_endpoint.local_receiver) ->
unit -> Netftp_client.ftp_method
val parse_mlsd_document : string -> Netftp_client.entry list
type entry_type = [ `Cdir | `Dir | `File | `Other | `Pdir ]
type entry_perm =
[ `Append
| `Create
| `Delete
| `Delete_member
| `Enter
| `List
| `Mkdir
| `Read
| `Rename
| `Write ]
val get_name : Netftp_client.entry -> string
val get_size : Netftp_client.entry -> int64
val get_modify : Netftp_client.entry -> float
val get_create : Netftp_client.entry -> float
val get_type : Netftp_client.entry -> Netftp_client.entry_type
val get_unique : Netftp_client.entry -> string
val get_perm : Netftp_client.entry -> Netftp_client.entry_perm list
val get_lang : Netftp_client.entry -> string
val get_media_type : Netftp_client.entry -> string
val get_charset : Netftp_client.entry -> string
val get_unix_mode : Netftp_client.entry -> int
val get_unix_uid : Netftp_client.entry -> string
val get_unix_gid : Netftp_client.entry -> string
class ftp_client :
?event_system:Unixqueue.event_system ->
unit ->
object
method configure_timeout : float -> unit
method event_system : Unixqueue.event_system
method exec : Netftp_client.ftp_method -> unit
method exec_e : Netftp_client.ftp_method -> unit Uq_engines.engine
method pi : Netftp_client.ftp_client_pi
method reset : unit -> unit
method run : unit -> unit
method set_socks5_proxy : string -> int -> unit
end
module Debug : sig val enable : bool Stdlib.ref end
end