Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 114 by dubn...@gmail.com: MultiOpener doesn't has ability to set
writefs [patch]
http://code.google.com/p/pyfilesystem/issues/detail?id=114
To create writable milti://... filesystems, the following patch should be
applied to fs/opener.py:
@classmethod
def get_fs(cls, registry, fs_name, fs_name_params, fs_path, writeable,
create_dir):
from fs.multifs import MultiFS
from ConfigParser import ConfigParser
cfg = ConfigParser()
if '#' in fs_path:
path, section = fs_path.split('#', 1)
else:
path = fs_path
section = 'fs'
cfg.readfp(registry.open(path))
multi_fs = MultiFS()
for name, fs_url in cfg.items(section):
- multi_fs.addfs(name, registry.opendir(fs_url,
create_dir=create_dir))
+ multi_fs.addfs(name, registry.opendir(fs_url,
create_dir=create_dir), name=='writefs')
return multi_fs, ''