Registry / utility / fs-lock

fs-lock

JSON →
library0.1.16rscratesunverified

Locked files that can be used like normal File.

# Cargo.toml [dependencies] fs-lock = "0.1.16"
INSTALL
IMPORT
SIG · FS-LOCK
F
fs-lock
utilityrustv0.1.16
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.

LockedFile
✓ use fs_lock::LockedFile;

Opens a file and acquires an exclusive lock.

use fs_lock::LockedFile; use std::fs::OpenOptions; fn main() -> std::io::Result<()> { let file = OpenOptions::new().write(true).open("test.lock")?; let locked = LockedFile::new(file)?; println!("File locked"); Ok(()) }
Debug
Known issues
gotchaLocking behavior is platform-specific; may not work on all filesystems.
fix
Test on your target platform and consider using advisory locks for cross-platform support.
affects: >=0.1.0
Upgrade
Version history
0.1.16latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

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