Sys.Posix (Hyper v0.1.0)

Copy Markdown View Source

POSIX filesystem helpers.

Summary

Functions

Test whether an existing file is a directory that the current user can write to, and if it doesn't exist, create it, including any parents.

Check whether a file exists and is executable.

Functions

ensure_writable_dir(path)

@spec ensure_writable_dir(Path.t()) :: {:ok} | {:error, atom()}

Test whether an existing file is a directory that the current user can write to, and if it doesn't exist, create it, including any parents.

executable?(path)

@spec executable?(Path.t()) :: boolean()

Check whether a file exists and is executable.