Function is_valid_file_path

Source
pub fn is_valid_file_path(path: &str) -> bool
Expand description

Validate that a file path exists

This function checks whether the specified file path exists on the filesystem.

§Arguments

  • path - The file path to validate

§Returns

true if the file exists, false otherwise.

§Examples

use tree_parser::is_valid_file_path;
 
// This will depend on your actual filesystem
let exists = is_valid_file_path("Cargo.toml");