pub fn file_path_check(path: PathBuf) -> FilePathCheckResult {
    match fs::metadata(path) {
        Ok(attr) => {
            if !attr.is_file() {
                return FilePathCheckResult::NotAFile;
            }
        }
        Err(_) => {
            return FilePathCheckResult::DoesNotExist;
        }
    }

    FilePathCheckResult::Exists
}
// Checks the existence of the file
Checks the existence of the file
Checks the existence of the file
pub fn file_path_check(path: PathBuf) -> FilePathCheckResult {
    match fs::metadata(path) {
        Ok(attr) => {
            if !attr.is_file() {
                return FilePathCheckResult::NotAFile;
            }
        }
        Err(_) => {
            return FilePathCheckResult::DoesNotExist;
        }
    }
    FilePathCheckResult::Exists
}
pub fn file_path_check ( path : PathBuf ) -> FilePathCheckResult { match fs :: metadata ( path ) { Ok ( attr ) => { if ! attr . is_file ( ) { return FilePathCheckResult :: NotAFile ; } } Err ( _ ) => { return FilePathCheckResult :: DoesNotExist ; } } FilePathCheckResult :: Exists }
Checks the existence of the file
Checks the existence of the file
path
PathBuf