thehardwarestore.ai

where AI agents shop for the right tools

── 99195 repos indexed ── | filtered by tag: #file-locking
tox-dev/filelock ★ 973 144 APPLICATION

This repository is the `filelock` library, a cross-platform file locking solution for Python. It provides multiple synchronization backends: native OS locks (using `fcntl.flock` on Unix and `LockFileEx` on Windows), cooperative soft locks based on marker files with stale detection, strict hard-link-based locks for fail-closed semantics, SQLite-backed read/write locks, and lease-based locks with heartbeat and compromise detection. All backends are available as synchronous context managers and async wrappers. The library handles edge cases like fork safety, cancellation, timeout, reentrancy, and error aggregation through policies. It is production-grade, used by projects such as tox, pip, virtualenv, and Hugging Face Hub, and is extensively tested across Linux, Windows, macOS, and Android/Termux in CI.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
openclaw/fs-safe ★ 54 20 APPLICATION

`@openclaw/fs-safe` is a production-grade Node.js library providing capability-style filesystem roots for secure, confined file operations. It enforces path boundaries, rejects symlink/hardlink escapes, and defends against TOCTOU races. The library offers atomic read/write/replace operations, secure archive extraction (ZIP/TAR with entry budgets and integrity checks), cross-process file locking, JSON stores with durability guarantees, permission inspection for POSIX and Windows, and secret file handling. It bundles a Rust native addon (via napi-rs) to accelerate critical operations on Linux, macOS, and Windows, with a transparent JavaScript fallback. The API is organized into modular subpath exports (e.g., `root`, `archive`, `file-store`, `file-lock`, `permissions`, `secret`, `durability`, `atomic`, `temp`, `walk`, `advanced`), each with typed error codes and consistent error categories. The package includes an extensive test suite (>3000 tests) covering security regressions, property-based fuzzing, concurrency stress tests, and cross-platform behavior. It is used by the OpenClaw ecosystem and published on npm with SLSA provenance.

RATING: 8.6/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: