Registry / utility / fd-lock

fd-lock

JSON →
library4.0.4rscratesunverified

Advisory cross-platform lock on a file using a file descriptor to it.

# Cargo.toml [dependencies] fd-lock = "4.0.4"
INSTALL
IMPORT
SIG · FD-LOCK
F
fd-lock
utilityrustv4.0.4
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.

RwLock
✓ use fd_lock::RwLock;

Advisory file locking using file descriptors

use fd_lock::RwLock; use std::fs::File; fn main() -> Result<(), Box<dyn std::error::Error>> { let file = File::create("lockfile")?; let lock = RwLock::new(file); let _guard = lock.write()?; println!("Lock acquired"); Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.0.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
fd-lock — cargo add fd-lock · libregistry