pub fn purgelock(basedir: &Path) -> Result<File, io::Error> {
    let f = OpenOptions::new()
        .write(true)
        .create(false)
        .open(basedir.join(".purge"))?;
    f.try_lock_shared()?;
    Ok(f)
}
/// Aqcuire 'purge' lock which prevents backy from deleting chunks
Aqcuire 'purge' lock which prevents backy from deleting chunks
Aqcuire ' purge ' lock which prevents backy from deleting chunks
pub fn purgelock(basedir: &Path) -> Result<File, io::Error> {
    let f = OpenOptions::new()
        .write(true)
        .create(false)
        .open(basedir.join(".purge"))?;
    f.try_lock_shared()?;
    Ok(f)
}
pub fn purgelock ( basedir : & Path ) -> Result < File , io :: Error > { let f = OpenOptions :: new ( ) . write ( true ) . create ( false ) . open ( basedir . join ( " " ) ) ? ; f . try_lock_shared ( ) ? ; Ok ( f ) }
Aqcuire 'purge' lock which prevents backy from deleting chunks
Aqcuire ' purge ' lock which prevents backy from deleting chunks
basedir
&Path
basedir
&Path