lock

Function lock 

Source
pub fn lock<P>(file_path: &LockPath<P>) -> Result<LockGuard, Error>
where P: AsRef<Path>,
Expand description

Locks the file in a blocking manner.

ยงErrors

Propagates any std::io::Errors caused by opening / locking the file.