sig
type protocol = string
exception Error of exn
exception Not_implemented
exception Unknown_protocol of Fetch.protocol
exception Bad_URI
type uri = string
val supported_protocols : unit -> Fetch.protocol list
val get_protocol : Fetch.uri -> Fetch.protocol
type open_flag = O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_TRUNC
type seek_command = SEEK_SET | SEEK_CUR | SEEK_END
type file_perm = int
type file_descr
type file_kind = S_REG | S_DIR
val openfile :
Fetch.uri -> Fetch.open_flag list -> Fetch.file_perm -> Fetch.file_descr
val close : Fetch.file_descr -> unit
val read : Fetch.file_descr -> string -> int -> int -> int
val write : Fetch.file_descr -> string -> int -> int -> int
val lseek : Fetch.file_descr -> int -> Fetch.seek_command -> int
val ls : Fetch.uri -> (Fetch.uri * Fetch.file_kind) list
val basename : string -> string
val cp : Fetch.uri -> Fetch.uri -> unit
val is_alive : Fetch.uri -> bool
end