Module Ftp.File

module File: FILE 
High-level functions to access files via ftp.

val ls : string -> (string * Ftp.stats) list
List files and their properties of a directory.
type file_descr 
Type of file descriptors.
type open_flag = 
| O_RDONLY
| O_WRONLY
| O_RDWR
Open files: what for?
val openfile : string -> open_flag list -> Ftp.file_perm -> file_descr
openfile name flags perms opens the file named name with flags flags and mode mode (in octal).
val close : file_descr -> unit
Close a previously opened file.
val read : file_descr -> string -> int -> int -> int
Read data in an opened file.
type seek_command = 
| SEEK_SET (*
indicates positions relative to the beginning of the file
*)
| SEEK_CUR (*
indicates positions relative to the current position
*)
| SEEK_END (*
indicates positions relative to the end of the file
*)
Positioning modes for lseek.
val lseek : file_descr -> int -> seek_command -> int
Seek in an opened file.