pub(super) fn lock_dir(dir: &str) -> Result<File> {
    let lock_file = File::create(lock_file_path(dir))?;
    lock_file.try_lock_exclusive().map_err(|e| {
        Error::Other(box_err!(
            "Failed to lock file: {}, maybe another instance is using this directory.",
            e
        ))
    })?;
    Ok(lock_file)
}
/// Creates and exclusively locks a lock file under the given directory.
Creates and exclusively locks a lock file under the given directory.
Creates and exclusively locks a lock file under the given directory .
pub(super) fn lock_dir(dir: &str) -> Result<File> {
    let lock_file = File::create(lock_file_path(dir))?;
    lock_file.try_lock_exclusive().map_err(|e| {
        Error::Other(box_err!(
            "Failed to lock file: {}, maybe another instance is using this directory.",
            e
        ))
    })?;
    Ok(lock_file)
}
pub ( super ) fn lock_dir ( dir : & str ) -> Result < File > { let lock_file = File :: create ( lock_file_path ( dir ) ) ? ; lock_file . try_lock_exclusive ( ) . map_err ( | e | { Error :: Other ( box_err ! ( " " e ) ) } ) ? ; Ok ( lock_file ) }
Creates and exclusively locks a lock file under the given directory.
Creates and exclusively locks a lock file under the given directory .
dir
&str