Check if a File or Directory Path Exists in Rust
June 2023
use PathBuf;
Output:
[_active_nvim_run:5:5] path_exists(&file_path) = true
The is the basic way to check if a file exists using `.try_exists()`rust` instead of `.exists()`rust`. The difference between the two is that `.try_exists()rust will produce an Err for things like permissions issues or broken symbolic links.
end of line