Module Sfile (.ml)

module Sfile: sig .. end
Messing with files.

val string_of_file : string -> string
string_of_file filename returns the content of filename in the form of one string.
Author(s): Maxence Guesdon
Version: 1.0
Raises Sys_error if the file could not be opened.
File.string_of_file
val file_of_string : file:string -> string -> unit
file_of_string ~file str creates a file named filename whose content is str.
Author(s): Fabrice Lefessant
Version: 1.1
Raises Sys_error if the file could not be opened.
File.file_of_string
val iter_lines : (string -> unit) -> Pervasives.in_channel -> unit
iter_lines f in_channel reads in_channel line by line, applying f to each one.
Author(s): Fabrice Lefessant
Version: 1.0
File.iter_lines
val iter_file_lines : (string -> unit) -> string -> unit
iter_file_lines f filename reads filename line by line, applying f to each one.
Author(s): Fabrice Lefessant
Version: 1.0
Raises Sys_error if the file could not be opened.
File.iter_file_lines
val value_of_file : string -> 'a
value_of_file filename reads a value from filename using input_value.
Author(s): Fabrice Lefessant
Version: 1.0
Raises Sys_error if the file could not be opened.
File.value_of_file
val file_of_value : string -> 'a -> unit
file_of_value filename v writes a value v to filename using output_value.
Author(s): Fabrice Lefessant
Version: 1.0
Raises Sys_error if the file could not be opened.
File.file_of_value
val load_file : (Pervasives.in_channel -> 'a) -> string -> 'a
load_file f file opens file and use f to read from this file. Then file is closed and the value is returned.
Author(s): Maxence Guesdon
Version: 1.0
Raises Sys_error if the file could not be opened.
File.load_file
val store_file : (Pervasives.out_channel -> 'a -> unit) -> string -> 'a -> unit
store_file f file v opens file and uses f to write value v to the file. Then closes file.
Author(s): Maxence Guesdon
Version: 1.0
Raises Sys_error if the file could not be opened.
File.store_file
val safe_remove_file : string -> unit
Remove the given file, and ignore the error if the file does not exist (catch Sys_error).
Version: 1.0
File.safe_remove_file
val create_file : string -> unit
Create the given empty file.
Version: 1.0
Raises Sys_error if an error occurs.
File.create_file
val in_channel_is_file : Pervasives.in_channel -> bool
in_channel_is_file channel returns true if the given in_channel corresponds to a file.
Author(s): Maxence Guesdon
Version: 1.0
File.in_channel_is_file
val out_channel_is_file : Pervasives.out_channel -> bool
out_channel_is_file channel returns true if the given out_channel corresponds to a file.
Author(s): Maxence Guesdon
Version: 1.0
File.out_channel_is_file
module Find: sig .. end
Finding files.
val subdirs : string -> string list
subdirs path returns the list of subdirectories of the given directory name. Returned names are relative to the given path.
Author(s): Maxence Guesdon
Version: 0.2
Raises Unix_error if an error occurs.
File.subdirs