]> git.lizzy.rs Git - rust.git/commitdiff
Clarify 'writable'-changing behavior of `set_readonly`.
authorCorey Farwell <coreyf@rwell.org>
Tue, 15 Aug 2017 14:13:35 +0000 (10:13 -0400)
committerCorey Farwell <coreyf@rwell.org>
Wed, 16 Aug 2017 01:43:11 +0000 (21:43 -0400)
Fixes https://github.com/rust-lang/rust/issues/41984.

src/libstd/fs.rs

index e6968f41af4a7bdbc91e8d4aecece96359543525..a438b4afdd0c9f37679de65a647725e5bb9b3710 100644 (file)
@@ -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.