faccess
Basic file accessibility checks for Rust.
Synopsis
use Path;
use PathExt;
let path = new;
assert!;
assert!;
assert!;
On Unix, this uses faccessat(2)
with AT_EACCESS
to check against the
effective user and group ID's, on other platforms it simply proxies to
exists()
and readonly()
as appropriate.
Caveats
Beware not to introduce any serious time-of-check to time-of-use (TOCTOU) bugs with these functions. They are strictly best-effort and are absolutely not alternatives to checking to see if opening a file or launching a program actually succeeded.