summaryrefslogtreecommitdiffstats
path: root/vendor/xflags/examples/immediate-mode.rs
blob: ee3baa3deab43ea4719d929f4af286603f61410b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

fn main() {
    let flags = xflags::parse_or_exit! {
        /// Remove directories and their contents recursively.
        optional -r,--recursive
        /// File or directory to remove
        required path: PathBuf
    };

    println!(
        "removing {}{}",
        flags.path.display(),
        if flags.recursive { "recursively" } else { "" },
    )
}