Skip to main content

is_path_writable

Function is_path_writable 

Source
pub fn is_path_writable(path: &Path) -> bool
Expand description

Check whether the target path (or, if it doesn’t exist yet, its nearest existing ancestor) is writable by the current process.

Uses access(2) (the POSIX W_OK check) so it correctly tests against the effective uid/gid — unlike Permissions::readonly() which only inspects mode bits and doesn’t account for file ownership.