faccess
Basic file accessibility checks for Rust.
Synopsis
use Path;
use ;
let path = new;
assert!;
assert!;
assert!;
assert!;
On Unix, this uses faccessat(2)
with AT_EACCESS
to check against the
effective user and group ID's.
On Windows it uses, amongst other things, AccessCheck
to try to match the
appropriate semantics.
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.