sig
type ftp_connection
type file_kind = S_REG | S_DIR | S_CHR | S_BLK | S_LNK | S_FIFO | S_SOCK
type file_perm = int
type stats = {
st_kind : Ftp.file_kind;
st_perm : Ftp.file_perm;
st_nlink : int;
st_un : string;
st_gn : string;
st_size : int;
st_mtime : float;
}
exception Unrecognised_format
val connect : string -> int -> string -> string -> Ftp.ftp_connection
val disconnect : Ftp.ftp_connection -> unit
val set_passive : Ftp.ftp_connection -> bool -> unit
val get_cur_dir : Ftp.ftp_connection -> string
val chdir : Ftp.ftp_connection -> string -> unit
val chdir_up : Ftp.ftp_connection -> unit
val list_files : Ftp.ftp_connection -> string -> string list
val get_file_size : Ftp.ftp_connection -> string -> int
val ls : Ftp.ftp_connection -> string -> (string * Ftp.stats) list
val stat : Ftp.ftp_connection -> string -> Ftp.stats
val get_file : Ftp.ftp_connection -> string -> string -> unit
val resume_file : Ftp.ftp_connection -> string -> string -> int -> unit
val get_file_portion :
Ftp.ftp_connection -> string -> int -> string -> int -> int -> int
val mv : Ftp.ftp_connection -> string -> string -> unit
val rm : Ftp.ftp_connection -> string -> unit
val rmdir : Ftp.ftp_connection -> string -> unit
val mkdir : Ftp.ftp_connection -> string -> unit
val nop : Ftp.ftp_connection -> unit
module type FILE =
sig
val ls : string -> (string * Ftp.stats) list
type file_descr
type open_flag = O_RDONLY | O_WRONLY | O_RDWR
val openfile :
string ->
Ftp.FILE.open_flag list -> Ftp.file_perm -> Ftp.FILE.file_descr
val close : Ftp.FILE.file_descr -> unit
val read : Ftp.FILE.file_descr -> string -> int -> int -> int
type seek_command = SEEK_SET | SEEK_CUR | SEEK_END
val lseek : Ftp.FILE.file_descr -> int -> Ftp.FILE.seek_command -> int
end
module File : FILE
end