{"id":75360,"library":"fs-lock","title":"fs-lock","description":"Locked files that can be used like normal File.","status":"active","version":"0.1.16","language":"rust","source_language":null,"source_url":"https://github.com/cargo-bins/cargo-binstall","tags":["file","lock","synchronization","io"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nfs-lock = \"0.1.16\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add fs-lock","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"LockedFile","correct":"use fs_lock::LockedFile;"}],"quickstart":{"code":"use fs_lock::LockedFile;\nuse std::fs::OpenOptions;\n\nfn main() -> std::io::Result<()> {\n    let file = OpenOptions::new().write(true).open(\"test.lock\")?;\n    let locked = LockedFile::new(file)?;\n    println!(\"File locked\");\n    Ok(())\n}","lang":"rust","description":"Opens a file and acquires an exclusive lock."},"warnings":[{"fix":"Test on your target platform and consider using advisory locks for cross-platform support.","message":"Locking behavior is platform-specific; may not work on all filesystems.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'file':5,12,13 'fs':2 'fs-lock':1 'io':16 'like':10 'lock':3,4,14 'normal':11 'synchron':15 'use':9","created_at":"2026-06-17T19:15:45.423102+00:00","updated_at":"2026-06-17T19:15:45.423102+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/cargo-bins/cargo-binstall","github":"https://github.com/cargo-bins/cargo-binstall","docs":"https://docs.rs/fs-lock/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}