OS.ULow level Unix access.
These functions simply call functions from the Unix module and replace strings with Fpath.t where appropriate. They also provide more fine grained error handling, for example OS.Path.stat converts the error to a message while stat gives you the Unix error.
pp_error ppf e prints e on ppf.
val open_error : 'a result -> ('a, [> `Unix of Unix.error ]) Stdlib.resultopen_error r allows to combine a closed unix error variant with other variants.
val error_to_msg : 'a result -> ('a, [> Rresult.R.msg ]) Stdlib.resulterror_to_msg r converts unix errors in r to an error message.
val call : ('a -> 'b) -> 'a -> 'b resultcall f v is Ok (f v) but Unix.EINTR errors are catched and handled by retrying the call. Other errors e are catched aswell and returned as Error (`Unix e).
val mkdir : Fpath.t -> Unix.file_perm -> unit resultmkdir is Unix.mkdir, see POSIX mkdir.
val link : Fpath.t -> Fpath.t -> unit resultlink is Unix.link, see POSIX link.
val unlink : Fpath.t -> unit resultstat is Unix.unlink, POSIX unlink.
val rename : Fpath.t -> Fpath.t -> unit resultrename is Unix.rename, see POSIX rename.
val stat : Fpath.t -> Unix.stats resultstat is Unix.stat, see POSIX stat.
val lstat : Fpath.t -> Unix.stats resultlstat is Unix.lstat, see POSIX lstat.
val truncate : Fpath.t -> int -> unit resulttruncate is Unix.truncate, see POSIX truncate.