pub fn file_name_from_path(path: &str) -> StringExpand description
Extract the filename from a path, with fallback to the full path.
ยงExamples
use vtcode_file_search::file_name_from_path;
assert_eq!(file_name_from_path("src/main.rs"), "main.rs");
assert_eq!(file_name_from_path("Cargo.toml"), "Cargo.toml");
assert_eq!(file_name_from_path("/absolute/path/file.txt"), "file.txt");