fcntl-rs
Wrapper around fcntl (2) and convenience methods to make interacting with it easier. Currently only supports commands related to Advisory record locking.
Usage
Cargo.toml
[]
= "0.1"
use OpenOptions;
use ;
// Open file
let file = new.read.open.unwrap;
// Check whether any process is currently holding a lock
match is_file_locked
// Attempt to acquire a lock
match lock_file
// Release lock again
match unlock_file
License
MIT OR Apache-2.0