Skip to content

Commit 10a479e

Browse files
committed
Clarify 'writable'-changing behavior of set_readonly.
Fixes #41984.
1 parent 5a93be4 commit 10a479e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libstd/fs.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,11 @@ impl Permissions {
934934
#[stable(feature = "rust1", since = "1.0.0")]
935935
pub fn readonly(&self) -> bool { self.0.readonly() }
936936

937-
/// Modifies the readonly flag for this set of permissions.
937+
/// Modifies the readonly flag for this set of permissions. If the
938+
/// `readonly` argument is `true`, using the resulting `Permission` will
939+
/// update file permissions to forbid writing. Conversely, if it's `false`,
940+
/// using the resulting `Permission` will update file permissions to allow
941+
/// writing.
938942
///
939943
/// This operation does **not** modify the filesystem. To modify the
940944
/// filesystem use the `fs::set_permissions` function.

0 commit comments

Comments
 (0)