Now running ProperPath("~/foo").remove() will throw:
>>> p.kind
'dir'
>>> p.remove()
WARNING Permission to remove PATH=/Users/culdesac/foo/bar from SOURCE=~/foo is denied. path.py:196
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/culdesac/Workshop/elapi_frontend_plugin/.venv/lib/python3.9/site-packages/elapi/path.py", line 215, in remove
self._remove_file(_file=ref, verbose=verbose)
File "/Users/culdesac/Workshop/elapi_frontend_plugin/.venv/lib/python3.9/site-packages/elapi/path.py", line 198, in _remove_file
raise e
File "/Users/culdesac/Workshop/elapi_frontend_plugin/.venv/lib/python3.9/site-packages/elapi/path.py", line 189, in _remove_file
file.unlink()
File "/opt/homebrew/Cellar/python@3.9/3.9.19_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1354, in unlink
self._accessor.unlink(self)
PermissionError: [Errno 1] Operation not permitted: '/Users/culdesac/foo/bar'
Now running
ProperPath("~/foo").remove()
will throw: