fn is_regular_file(path: &Path) -> Result<bool, Error>
Whether path is a regular file. Path::is_file folds every stat error into “not there”, which reads a permission or io failure as an absent file; this reports it instead.
path
Path::is_file