MCPcopy Create free account
hub / github.com/delinoio/oss / set_executable

Function set_executable

crates/nodeup/tests/cli.rs:36–48  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

34}
35
36fn set_executable(path: &Path) {
37 #[cfg(unix)]
38 {
39 let mut permissions = fs::metadata(path).unwrap().permissions();
40 permissions.set_mode(0o755);
41 fs::set_permissions(path, permissions).unwrap();
42 }
43
44 #[cfg(not(unix))]
45 {
46 let _ = path;
47 }
48}
49
50fn path_string_ends_with_components(path: &str, suffix: &[&str]) -> bool {
51 let normalized = path.replace('\\', "/");

Callers 1

write_runtime_executableFunction · 0.85

Calls 1

metadataFunction · 0.50

Tested by

no test coverage detected