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

Function is_executable

src/phpcs.rs:124–129  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

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

Callers 1

whichFunction · 0.70

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected