is_executable
Is there an executable file at the given path?
A small helper function which determines whether or not the given path points to
an executable file. If there is no file at the given path, or the file is not
executable, then false
is returned. When there is a file and the file is
executable, then true
is returned.
This crate works on both Unix-based operating systems (macOS, Linux, FreeBSD, etc...) and Windows.
Does not help with time-of-check to time-of use (TOCTOU) races.
The API comes in two flavors:
-
An extension trait to add an
is_executable
method onstd::path::Path
:use Path; use IsExecutable;
-
For convenience, a standalone
is_executable
function, which takes anyAsRef<Path>
:use Path; use is_executable;
License: Apache-2.0/MIT