From 10a479ebe170398e70f872a7afa222d00a9c8f53 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Tue, 15 Aug 2017 10:13:35 -0400 Subject: Clarify 'writable'-changing behavior of `set_readonly`. Fixes https://github.com/rust-lang/rust/issues/41984. --- src/libstd/fs.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index e6968f41af4..a438b4afdd0 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -934,7 +934,11 @@ impl Permissions { #[stable(feature = "rust1", since = "1.0.0")] pub fn readonly(&self) -> bool { self.0.readonly() } - /// Modifies the readonly flag for this set of permissions. + /// Modifies the readonly flag for this set of permissions. If the + /// `readonly` argument is `true`, using the resulting `Permission` will + /// update file permissions to forbid writing. Conversely, if it's `false`, + /// using the resulting `Permission` will update file permissions to allow + /// writing. /// /// This operation does **not** modify the filesystem. To modify the /// filesystem use the `fs::set_permissions` function. -- cgit 1.4.1-3-g733a5