diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-08-15 10:13:35 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2017-08-15 21:43:11 -0400 |
| commit | 10a479ebe170398e70f872a7afa222d00a9c8f53 (patch) | |
| tree | 18f49f182eebd7fea2bda4f330c85b49adcb3464 /src/libstd | |
| parent | 5a93be48c360bb1d874c53e8445cb3bce2bf5a1f (diff) | |
| download | rust-10a479ebe170398e70f872a7afa222d00a9c8f53.tar.gz rust-10a479ebe170398e70f872a7afa222d00a9c8f53.zip | |
Clarify 'writable'-changing behavior of `set_readonly`.
Fixes https://github.com/rust-lang/rust/issues/41984.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fs.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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. |
