filelocksmith 1.0.0

Detect what processes are locking a file or folder on Windows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn main() {
    println!("{:?}", filelocksmith::is_process_elevated());
    println!("{:?}", filelocksmith::set_debug_privilege());
    println!("{:?}", filelocksmith::pid_to_process_path(12352));
    let pids = filelocksmith::find_processes_locking_path(r"C:\filelocksmith-test");
    println!("{:?}", pids);

    for pid in &pids {
        println!("[{}] {:?}", pid, filelocksmith::pid_to_process_path(*pid));
    }

    if filelocksmith::quit_processes(pids) {
        println!("Processes quit successfully");
    }
}