Down_std.File
Files.
val null : string
null is an empty file that discards all writes.
null
val exists : string -> (bool, string) Stdlib.result
exists file checks for file (or directory) existence.
exists file
val delete : string -> (unit, string) Stdlib.result
delete file deletes file file.
delete file
file
val rename : string -> dst:string -> (unit, string) Stdlib.result
rename src ~dst renames src into dst.
rename src ~dst
src
dst
val read : string -> (string, string) Stdlib.result
read file is the contents of file file.
read file
val write : file:string -> string -> (unit, string) Stdlib.result
write file d writes d to file.
write file d
d
val set_content : file:string -> string -> (unit, string) Stdlib.result
set_content ~file s sets the contents of file file to s. The path to the file is created if it doesn't exist.
set_content ~file s
s
val tmp : ?suff:string -> unit -> (string, string) Stdlib.result
tmp () is a temporary file whose name ends with suff.
tmp ()
suff