Skip to main content

Module fd_lock

Module fd_lock 

Source
Expand description

File locking utilities.

Re-exportsยง

use crate::util::pretty_err; ๐Ÿ”’
use std::fs::File; ๐Ÿ”’
use std::fs::OpenOptions; ๐Ÿ”’
use std::path::Path; ๐Ÿ”’

Structsยง

RwLock
Advisory reader-writer lock for files.
RwLockReadGuard
RAII structure used to release the shared read access of a lock when dropped.
RwLockWriteGuard
RAII structure used to release the exclusive write access of a lock when dropped.

Constantsยง

LOCK_TOKEN ๐Ÿ”’

Functionsยง

lock_exists ๐Ÿ”’
new_lock
Creates a new lock file at the given path.