Module OS.Dir
Directory operations.
Existence and contents
val exists : fpath -> bool result
exists dir
istrue
if directorydir
exists in the file system. Symbolic links are followed.
val must_exist : fpath -> fpath result
must_exist dir
isdir
iffile
is a regular file in the file system and an error otherwise. Symbolic links are followed.
val contents : ?dotfiles:bool -> ?rel:bool -> fpath -> fpath list result
contents ~dotfiles ~rel dir
is the list of directories and filse indir
. Ifrel
istrue
(defaults tofalse
) the resulting paths are relative todir
, otherwise they havedir
prepended. Ifdotfiles
isfalse
(default) elements that start with a.
are omitted.