Closed
Description
I'd like to have read-only FS, however I am able to do
from fs.opener import open_fs
with open_fs(".", writeable=False) as fs_:
fs_.writetext("spam", "vikings")
I'd expect it to fail, like the
from fs.wrap import read_only, WrapReadOnly
r = read_only(fs_)
r.writetext("spam", "vikings")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/disks/repo/bin/miniconda3/envs/deeplearning/lib/python3.8/site-packages/fs/wrap.py", line 221, in writetext
raise ResourceReadOnly(path)
fs.errors.ResourceReadOnly: resource 'spam' is read only