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

Function is_executable

src/mago.rs:135–140  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

133/// Check whether a file is executable.
134#[cfg(unix)]
135fn is_executable(path: &Path) -> bool {
136 use std::os::unix::fs::PermissionsExt;
137 std::fs::metadata(path)
138 .map(|m| m.permissions().mode() & 0o111 != 0)
139 .unwrap_or(false)
140}
141
142#[cfg(not(unix))]
143fn is_executable(_path: &Path) -> bool {

Callers 1

whichFunction · 0.70

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected