Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

861 B
Raw Blame
//! What keeps a drive "in use": every open file, folder and volume handle on it, by process.
//! `cargo run -p rf-win --example holders_probe -- D`
//!
//! Lists the processes this one may look into (the user's own); the ones it may not (the system's, an elevated program, an
//! antivirus) are named at the end, since one of them may be the holder. Reads only; nothing is closed or asked to let go.

fn main() {
    let letter = std::env::args().nth(1).and_then(|a| a.chars().next()).unwrap_or('C');
    let (lines, closed) = rf_win::holders::all_handles_on(letter);
    println!("{} handle(s) on {}: in the processes that could be looked into", lines.len(), letter.to_ascii_uppercase());
    for l in &lines {
        println!("  {l}");
    }
    println!("{} process(es) could not be looked into:", closed.len());
    println!("  {}", closed.join(", "));
}