MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _apply_mode

Function _apply_mode

openkb/mutation.py:26–29  ·  view source on GitHub ↗

Set ``path``'s permission bits (no-op where ``os.chmod`` is absent).

(path: Path, mode: int)

Source from the content-addressed store, hash-verified

24
25
26def _apply_mode(path: Path, mode: int) -> None:
27 """Set ``path``'s permission bits (no-op where ``os.chmod`` is absent)."""
28 if hasattr(os, "chmod"):
29 os.chmod(path, mode)
30
31
32def _fsync_file(path: Path) -> None:

Callers 2

_copy_file_atomicFunction · 0.85
_publish_staged_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected