rustc/vendor/xflags-0.3.2/examples/immediate-mode.rs
2024-06-24 14:48:22 +02:00

17 lines
387 B
Rust

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 { "" },
)
}