1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Contains CLI related code.

use std::env;

/// Returns the filepath from the command line arguments assuming that the
/// filepath is the first argument.
///
/// # Returns
///
/// * The filepath from the command line arguments.
/// 
/// # Panics
/// 
/// * If the filepath is not provided.
pub fn get_filepath() -> String {
    let args: Vec<String> = env::args().collect();
    args[1].to_owned()
}