Registry / utility / fs4
library1.1.0rscratesunverified

No libc, pure Rust cross-platform file locks. Original fs2, now supports async and replace libc by rustix.

# Cargo.toml [dependencies] fs4 = "1.1.0"
INSTALL
IMPORT
SIG · FS4
F
fs4
utilityrustv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FileExt
use fs4::FileExt;

Acquire an exclusive file lock

use fs4::FileExt; use std::fs::File; fn main() -> std::io::Result<()> { let file = File::create("test.lock")?; file.try_lock_exclusive()?; println!("Lock acquired"); Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fs4 — cargo add fs4 · libregistry