MCPcopy Create free account
hub / github.com/tox-dev/filelock / _unreadable_file

Function _unreadable_file

tasks/capabilities.py:307–315  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305
306@contextmanager
307def _unreadable_file() -> Generator[Path]:
308 with tempfile.TemporaryDirectory() as directory:
309 probe: Final[Path] = Path(directory, "probe")
310 probe.touch()
311 probe.chmod(0)
312 try:
313 yield probe
314 finally:
315 probe.chmod(0o600)
316
317
318def _has_a_sticky_tmp_of_another_user() -> bool:

Callers 2

_supports_file_modeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected