#[cfg(unix)]
use std::os::unix::fs::MetadataExt;
use std::path::Path;
pub(crate) trait IsExecutablePath {
fn is_executable(&self) -> bool;
}
impl IsExecutablePath for Path {
#[cfg(unix)]
fn is_executable(&self) -> bool {
self.metadata().unwrap().mode() & 0o111 != 0 }
#[cfg(not(unix))]
fn is_executable(&self) -> bool {
true
}
}