Skip to main content

validate_dir

Function validate_dir 

Source
pub fn validate_dir(input: &str) -> Result<Option<PathBuf>, String>
Expand description

Validates a directory

Expands path and checks if it exists and is a directory.

Used in sericoms clap cli interface to validate user input and propogate errors before running the program.

§Errors

Errors if path-expansion fails or if the path doesn’t exist or is not a dir.