module File:sig..end
type'aor_error =[ `Error of string | `Ok of 'a ]
typet =string
val to_string : t -> string
val make : string -> tval exists : t -> bool
val is_directory : t -> bool
val remove_exn : t -> unitremove_exn path tries to remove the file at path from the
file system.
Raises Sys_error if there is no file at path.
Since 0.8
val remove : t -> unit or_errorremove_exn but with an error monad.val remove_noerr : t -> unitremove_exn but do not raise any exception on failure.val read_dir : ?recurse:bool -> t -> t CCIO.genread_dir d returns a sequence of files and directory contained
in the directory d (or an empty stream if d is not a directory)recurse : if true (default false), sub-directories are also
exploredval read_exn : t -> stringval read : t -> string or_errorval append_exn : t -> string -> unitval append : t -> string -> unit or_errorval write_exn : t -> string -> unitval write : t -> string -> unit or_errortypewalk_item =[ `Dir | `File ] * t
val walk : t -> walk_item CCIO.genCCIO.File.read_dir (with recurse=true), this function walks
a directory recursively and yields either files or directories.
Is a file anything that doesn't satisfy CCIO.File.is_directory (including
symlinks, etc.)val show_walk_item : walk_item -> string
val with_temp : ?temp_dir:string -> prefix:string -> suffix:string -> (string -> 'a) -> 'awith_temp ~prefix ~suffix f will call f with the name of a new
temporary file (located in temp_dir).
After f returns, the file is deleted. Best to be used in
combination with CCIO.with_out.
See Filename.temp_file