Function validate_to_absolute_path

Source
pub fn validate_to_absolute_path(script_path: &PathBuf) -> Result<PathBuf>
Expand description

Parse and validate a script path.

The function takes a PathBuf as argument and checks if the path exists. If the path exists, it returns a tuple of (PathBuf, PathBuf), where the first element is the absolute path of the script and the second element is the parent directory of the script.

ยงErrors

The function returns an Err if the path does not exist or if the parent directory cannot be obtained.