Page
Library
Module
Module type
Parameter
Class
Class type
Source
OS.FileFile operations.
val null : fpathnull represents a file on the OS that discards all writes and returns end of file on reads.
val dash : fpathexists file is true if file is a regular in the file system and false otherwise. Symbolic links are followed.
must_exist file is file if file is a regular file in the file system and an error otherwise. Symbolic links are followed.
delete ~must_exist file deletes file file. If must_exist is true (defaults to false) an error is returned if file doesn't exist.
fold_files skip f acc paths folds f over the files found in the file hierarchies starting at paths. Files and directories p for which skip p is true are skipped. skip defaults to (fun _ -> false).
write_subst file vars content is like write except any occurence of a string of the form "%%ID%%" in content is replaced by the value of List.assoc "ID" vars, if any.