pub fn new<P: AsRef<Path>>(filename: P) -> FileLockExpand description
Creates a new FileLock instance.
This is a convenience function equivalent to FileLock::new(filename).
ยงExamples
use filelock;
let mut lock = filelock::new("myfile.lock");
let _guard = lock.lock().unwrap();