{"id":26116994,"url":"https://github.com/velopack/filelocksmith-rs","last_synced_at":"2025-04-13T08:43:14.368Z","repository":{"id":221237696,"uuid":"753818742","full_name":"velopack/filelocksmith-rs","owner":"velopack","description":"A rust crate to detect running processes locking a file or folder on Windows","archived":false,"fork":false,"pushed_at":"2024-09-27T19:43:46.000Z","size":174,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T00:22:29.138Z","etag":null,"topics":["automatic-updates","desktop","updater","velopack","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/velopack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T21:06:00.000Z","updated_at":"2024-09-27T19:43:49.000Z","dependencies_parsed_at":"2024-02-06T22:26:04.802Z","dependency_job_id":"9ccf6295-b743-4d92-9491-bbddcf03f4f6","html_url":"https://github.com/velopack/filelocksmith-rs","commit_stats":null,"previous_names":["velopack/update-locksmith","velopack/velopack.locksmith","velopack/filelocksmith-rs"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velopack%2Ffilelocksmith-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velopack%2Ffilelocksmith-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velopack%2Ffilelocksmith-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/velopack%2Ffilelocksmith-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/velopack","download_url":"https://codeload.github.com/velopack/filelocksmith-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473102,"owners_count":21109629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic-updates","desktop","updater","velopack","windows"],"created_at":"2025-03-10T10:53:31.441Z","updated_at":"2025-04-13T08:43:14.341Z","avatar_url":"https://github.com/velopack.png","language":"Rust","readme":"# filelocksmith-rs\n[![Version](https://img.shields.io/crates/v/filelocksmith?style=flat-square)](https://crates.io/crates/filelocksmith)\n[![License](https://img.shields.io/crates/l/filelocksmith?style=flat-square)](https://github.com/velopack/filelocksmith-rs/blob/master/LICENSE)\n[![Documentation](https://img.shields.io/docsrs/filelocksmith?style=flat-square)](https://docs.rs/filelocksmith/latest/filelocksmith/)\n\nReliably find and quit processes that are locking a file or folder on Windows.\nThis is a difficult problem to solve on Windows, as the OS does not provide a built-in or\nstraight-forward way to do this. \n\nAdditionally, unlike *nix, files and folders can not be deleted or moved while they are locked by a process.\n\nThis library wraps the FileLocksmith module from the Microsoft PowerToys project, which is written in C++.\n\nFurther documentation at https://docs.rs/filelocksmith\n\n## Installing\n```toml\n[dependencies]\nfilelocksmith = \"0.1\"\n```\n\n## Usage\n```rust\nuse filelocksmith::{find_processes_locking_path, quit_processes, pid_to_process_path};\n\nlet path = \"C:\\\\path\\\\to\\\\file.txt\";\nlet pids = find_processes_locking_path(path);\n\n// print paths of processes locking the file\nfor pid in \u0026pids {\n   println!(\"[{}] {:?}\", pid, pid_to_process_path(*pid));\n}\n\n// quit the processes locking the file\nif quit_processes(pids) {\n println!(\"Processes quit successfully\");\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelopack%2Ffilelocksmith-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelopack%2Ffilelocksmith-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelopack%2Ffilelocksmith-rs/lists"}