mmv_lib/
args.rs

1#![forbid(unsafe_code)]
2
3use clap::Parser;
4use std::path::PathBuf;
5
6use crate::{input_parser::ParsedPattern, output_pattern::ParsedOutput};
7
8#[derive(Debug, Parser)]
9pub struct MmvArgs {
10    /// The input path
11    input_path: PathBuf,
12    /// The output path
13    output_path: PathBuf,
14}
15
16impl MmvArgs {
17    pub fn get_parsed_input_pattern(&self) -> ParsedPattern {
18        ParsedPattern::new(self.input_path.as_path())
19    }
20
21    pub fn get_parsed_output(&self) -> ParsedOutput {
22        ParsedOutput::new(&self.output_path)
23    }
24}