MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / is_executable

Function is_executable

xtask/src/main.rs:9487–9492  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

9485
9486#[cfg(unix)]
9487fn is_executable(path: &Path) -> bool {
9488 use std::os::unix::fs::PermissionsExt;
9489 fs::metadata(path)
9490 .map(|metadata| metadata.permissions().mode() & 0o111 != 0)
9491 .unwrap_or(false)
9492}
9493
9494#[cfg(not(unix))]
9495fn is_executable(path: &Path) -> bool {

Callers 1

append_treeFunction · 0.85

Calls 1

extensionMethod · 0.45

Tested by

no test coverage detected