rewording after comments by @thomcc

This commit is contained in:
Marc Schoolderman 2023-08-29 11:20:56 +02:00
parent 53469cfc3f
commit 0df002a2e2

View File

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