Make.DirSourceexists t dir is true if dir is a directory in the file system and false otherwise.
must_exist t dir is Ok dir if dir is a directory in the file system and an error otherwise.
create t ~path dir creates, if needed, the directory dir. If path is true (default) intermediate directories are created, otherwise missing intermediate directories lead to an error. The result is Ok true if dir did not exist and was created, Ok false if dir already existed as a directory.
val delete :
blk Mfat.t ->
?must_exist:bool ->
?recurse:bool ->
Fpath.t ->
(unit, [> `Msg of string ]) resultdelete t ~must_exist ~recurse dir deletes the directory dir. If must_exist is true (defaults to false) an error is returned if dir doesn't exist. If recurse is true (default to false) no error occurs if the directory is non-empty: its contents is recursively deleted first.
val contents :
blk Mfat.t ->
?rel:bool ->
Fpath.t ->
(Fpath.t list, [> `Msg of string ]) resultcontents t ~rel dir is the list of directories and files in dir. If rel is true (defaults to false) the resulting paths are relative to dir, otherwise they have dir prepended.
val fold_contents :
?err:'b error ->
?dotfiles:bool ->
?elements:elements ->
?traverse:traverse ->
blk Mfat.t ->
(Fpath.t -> 'a -> 'a) ->
'a ->
Fpath.t ->
('a, [ `Msg of string ]) resultfold_contents err dotfiles elements traverse t f acc d is: contents t d >>= fold err dotfiles elements traverse t f acc.