Impl new RAII type helpers::flock::FileLock

that locks a file exclusive or shared

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-22 19:48:37 +10:00
parent 751cf47716
commit 9e45ba1032
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
2 changed files with 48 additions and 0 deletions

View file

@ -42,6 +42,9 @@ pub use tls_version::TLSVersion;
mod crate_name;
pub use crate_name::CrateName;
mod flock;
pub use flock::FileLock;
pub fn cargo_home() -> Result<&'static Path, io::Error> {
static CARGO_HOME: OnceCell<PathBuf> = OnceCell::new();