Checks whether a file can be accessed with a certain mode.
fn can_access<P>(path: P, mode: AccessMode) -> Result<bool, Errno>
where P: ToCString,| Name | Description |
|---|---|
| path | The path of the file to be checked. |
| mode | The mode we want to access the file with. |
Returns true if the file can be accessed with the specified mode, false otherwise.
If the path is relative, it will be interpreted relative to the current working directory.