Skip to content

Commit 0df002a

Browse files
committedAug 29, 2023
rewording after comments by @thomcc
1 parent 53469cf commit 0df002a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎library/std/src/fs.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1406,11 +1406,11 @@ impl Permissions {
14061406
/// On Unix-based platforms this checks if *any* of the owner, group or others
14071407
/// write permission bits are set. It does not check if the current
14081408
/// user is in the file's assigned group. It also does not check ACLs.
1409-
/// Therefore even if this returns false you may not be able to write to the
1410-
/// file, and vice versa. The [`PermissionsExt`] trait gives direct access
1411-
/// to the permission bits but also does not read ACLs. If you need to
1412-
/// accurately know whether or not a file is writable use the `access()`
1413-
/// function from libc.
1409+
/// Therefore the return value of this function cannot be relied upon
1410+
/// to predict whether attempts to read or write the file will actually succeed.
1411+
/// The [`PermissionsExt`] trait gives direct access to the permission bits but
1412+
/// also does not read ACLs. If you need to accurately know whether or not a file
1413+
/// is writable use the `access()` function from libc.
14141414
///
14151415
/// [`PermissionsExt`]: crate::os::unix::fs::PermissionsExt
14161416
///

0 commit comments

Comments
 (0)
Please sign in to comment.