@@ -114,7 +114,7 @@ impl Iterator for ReadDir {
114
114
fn next ( & mut self ) -> Option < io:: Result < DirEntry > > {
115
115
if self . handle . 0 == c:: INVALID_HANDLE_VALUE {
116
116
// This iterator was initialized with an `INVALID_HANDLE_VALUE` as its handle.
117
- // Simply return `None` because this is only the case when `FindFirstFileW ` in
117
+ // Simply return `None` because this is only the case when `FindFirstFileExW ` in
118
118
// the construction of this iterator returns `ERROR_FILE_NOT_FOUND` which means
119
119
// no matchhing files can be found.
120
120
return None ;
@@ -1071,7 +1071,7 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
1071
1071
first : Some ( wfd) ,
1072
1072
} )
1073
1073
} else {
1074
- // The status `ERROR_FILE_NOT_FOUND` is returned by the `FindFirstFileW ` function
1074
+ // The status `ERROR_FILE_NOT_FOUND` is returned by the `FindFirstFileExW ` function
1075
1075
// if no matching files can be found, but not necessarily that the path to find the
1076
1076
// files in does not exist.
1077
1077
//
@@ -1093,7 +1093,7 @@ pub fn readdir(p: &Path) -> io::Result<ReadDir> {
1093
1093
1094
1094
// Just return the error constructed from the raw OS error if the above is not the case.
1095
1095
//
1096
- // Note: `ERROR_PATH_NOT_FOUND` would have been returned by the `FindFirstFileW ` function
1096
+ // Note: `ERROR_PATH_NOT_FOUND` would have been returned by the `FindFirstFileExW ` function
1097
1097
// when the path to search in does not exist in the first place.
1098
1098
Err ( Error :: from_raw_os_error ( last_error. code as i32 ) )
1099
1099
}
@@ -1234,7 +1234,7 @@ fn metadata(path: &Path, reparse: ReparsePoint) -> io::Result<FileAttr> {
1234
1234
opts. custom_flags ( c:: FILE_FLAG_BACKUP_SEMANTICS | reparse. as_flag ( ) ) ;
1235
1235
1236
1236
// Attempt to open the file normally.
1237
- // If that fails with `ERROR_SHARING_VIOLATION` then retry using `FindFirstFileW `.
1237
+ // If that fails with `ERROR_SHARING_VIOLATION` then retry using `FindFirstFileExW `.
1238
1238
// If the fallback fails for any reason we return the original error.
1239
1239
match File :: open ( path, & opts) {
1240
1240
Ok ( file) => file. file_attr ( ) ,
@@ -1251,7 +1251,7 @@ fn metadata(path: &Path, reparse: ReparsePoint) -> io::Result<FileAttr> {
1251
1251
unsafe {
1252
1252
let path = maybe_verbatim ( path) ?;
1253
1253
1254
- // `FindFirstFileW ` accepts wildcard file names.
1254
+ // `FindFirstFileExW ` accepts wildcard file names.
1255
1255
// Fortunately wildcards are not valid file names and
1256
1256
// `ERROR_SHARING_VIOLATION` means the file exists (but is locked)
1257
1257
// therefore it's safe to assume the file name given does not
@@ -1274,7 +1274,7 @@ fn metadata(path: &Path, reparse: ReparsePoint) -> io::Result<FileAttr> {
1274
1274
// We no longer need the find handle.
1275
1275
c:: FindClose ( handle) ;
1276
1276
1277
- // `FindFirstFileW ` reads the cached file information from the
1277
+ // `FindFirstFileExW ` reads the cached file information from the
1278
1278
// directory. The downside is that this metadata may be outdated.
1279
1279
let attrs = FileAttr :: from ( wfd) ;
1280
1280
if reparse == ReparsePoint :: Follow && attrs. file_type ( ) . is_symlink ( ) {
0 commit comments