MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / is_executable

Function is_executable

src/phpstan.rs:122–127  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

120/// Check whether a file is executable.
121#[cfg(unix)]
122fn is_executable(path: &Path) -> bool {
123 use std::os::unix::fs::PermissionsExt;
124 std::fs::metadata(path)
125 .map(|m| m.permissions().mode() & 0o111 != 0)
126 .unwrap_or(false)
127}
128
129#[cfg(not(unix))]
130fn is_executable(_path: &Path) -> bool {

Callers 1

whichFunction · 0.70

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected