goalie.has_access¶
- goalie.has_access(x: str | PathLike[str], access: str = 'r') bool¶
Check filesystem access rights.
- Parameters:
x (str or os.PathLike) – Path to check.
access (str) – Access rights to check, as a string of
r/w/x.
- Returns:
Trueifxhas the requested access rights.- Return type:
Examples
>>> import os >>> has_access(os.path.expanduser("~")) True >>> has_access("nonexistent_path_xyz") False