Skip to content

Commit 989069e

Browse files
authored
Rollup merge of rust-lang#97635 - rgwood:patch-1, r=ChrisDenton
Fix file metadata documentation for Windows I noticed that the documentation for `fs::symlink_metadata()` and `fs::metadata()` is incorrect; [the underlying code](https://github.com/rust-lang/rust/blob/481db40311cdd241ae4d33f34f2f75732e44d8e8/library/std/src/sys/windows/fs.rs#L334) calls [`GetFileInformationByHandle()`](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfileinformationbyhandle) on Windows, not [`GetFileAttributesEx()`](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfileattributesexw). There are currently [no uses of `GetFileAttributesEx()` in this repo](https://github.com/rust-lang/rust/search?q=GetFileAttributesEx).
2 parents 6bc30f3 + 77d43e7 commit 989069e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: std/src/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
16201620
/// # Platform-specific behavior
16211621
///
16221622
/// This function currently corresponds to the `stat` function on Unix
1623-
/// and the `GetFileAttributesEx` function on Windows.
1623+
/// and the `GetFileInformationByHandle` function on Windows.
16241624
/// Note that, this [may change in the future][changes].
16251625
///
16261626
/// [changes]: io#platform-specific-behavior
@@ -1654,7 +1654,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
16541654
/// # Platform-specific behavior
16551655
///
16561656
/// This function currently corresponds to the `lstat` function on Unix
1657-
/// and the `GetFileAttributesEx` function on Windows.
1657+
/// and the `GetFileInformationByHandle` function on Windows.
16581658
/// Note that, this [may change in the future][changes].
16591659
///
16601660
/// [changes]: io#platform-specific-behavior

0 commit comments

Comments
 (0)