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

Function main

tasks/verify_filesystem.py:52–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def main() -> int:
53 # Each argument is a mount of the same filesystem. Two independent mounts (an NFS export mounted twice with
54 # nosharecache, say) are two client caches over one server, so contending across them is a genuine multi-client
55 # check, not two views of one cache. With no arguments a temporary directory checks the local single-mount case.
56 if mounts := [Path(argument) for argument in sys.argv[1:]]:
57 for mount in mounts:
58 mount.mkdir(parents=True, exist_ok=True)
59 return _verify_across(mounts)
60 with TemporaryDirectory(prefix="filelock-verify-") as directory:
61 return _verify_across([Path(directory)])
62
63
64def _verify_across(mounts: list[Path]) -> int:

Callers 1

Calls 1

_verify_acrossFunction · 0.85

Tested by

no test coverage detected