summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-06-02 11:13:26 +0200
committerGitHub <noreply@github.com>2022-06-02 11:13:26 +0200
commitfa79247826033eff7c422f95d6cda73dd0b211e1 (patch)
treea5da6a6bfe6b022007374c8b0fd31ed50def1a52
parenteb642d48ee44bfc303d25387cf875e4b3ac91586 (diff)
parent0835dfe5795ef7f7214a9fa6dc8facb8ed166a1c (diff)
downloadrust-fa79247826033eff7c422f95d6cda73dd0b211e1.tar.gz
Rollup merge of #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).
-rw-r--r--library/std/src/fs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 431a1efc8d1..55bd2c59406 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -1620,7 +1620,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// # Platform-specific behavior
///
/// This function currently corresponds to the `stat` function on Unix
-/// and the `GetFileAttributesEx` function on Windows.
+/// and the `GetFileInformationByHandle` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: io#platform-specific-behavior
@@ -1654,7 +1654,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
/// # Platform-specific behavior
///
/// This function currently corresponds to the `lstat` function on Unix
-/// and the `GetFileAttributesEx` function on Windows.
+/// and the `GetFileInformationByHandle` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: io#platform-specific-behavior