about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-08-06 11:41:16 -0700
committerJosh Triplett <josh@joshtriplett.org>2025-08-06 11:41:16 -0700
commite597071cbfec35f375eafb06fda6699b76478766 (patch)
tree8c99a03658ebaa8f381c0bf608d83dfe660d86d9
parenta99860b13a7f83a74b72beeddc9802e230f60212 (diff)
Reword documentation for `set_times` to clarify directory handling
-rw-r--r--library/std/src/fs.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index eb9f99af220..b3ca118a452 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -1112,8 +1112,9 @@ impl File {
     /// [may change in the future][changes].
     ///
     /// On most platforms, including UNIX and Windows platforms, this function can also change the
-    /// timestamps of a directory. To do so, open the directory with `File::open`, without
-    /// attempting to obtain write permission.
+    /// timestamps of a directory. To get a `File` representing a directory in order to call
+    /// `set_times`, open the directory with `File::open` without attempting to obtain write
+    /// permission.
     ///
     /// [changes]: io#platform-specific-behavior
     ///