diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-07 01:31:39 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-11-07 01:31:39 +0000 |
commit | 8fcf4df8488130bdd5285a97dd2f2de8c87d7f55 (patch) | |
tree | 01bb8b6e7493cf82c168345c309ce26ea870d13e /fs/multifs.py | |
parent | 739272ca040326f392917ba2540c14058e10f61b (diff) | |
download | pyfilesystem-git-8fcf4df8488130bdd5285a97dd2f2de8c87d7f55.tar.gz |
add module "fs.filelike" with utils for building file-like objects.
This is a local copy of the guts of my "filelike" module, re-licensed under
the MIT license.
This commit also uses it to fix a few edge-cases in various filesystem
implementations (e.g. truncating StringIO objects).
Diffstat (limited to 'fs/multifs.py')
-rw-r--r-- | fs/multifs.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/multifs.py b/fs/multifs.py index bf76942..387f6fe 100644 --- a/fs/multifs.py +++ b/fs/multifs.py @@ -3,9 +3,10 @@ fs.multifs ========== A MultiFS is a filesytem composed of a sequence of other filesystems, where -the directory structure of each filesystem is overlaid over the previous filesystem. -When you attempt to access a file from the MultiFS it will try each 'child' -FS in order, until it either finds a path that exists or raises a ResourceNotFoundError. +the directory structure of each filesystem is overlaid over the previous +filesystem. When you attempt to access a file from the MultiFS it will try +each 'child' FS in order, until it either finds a path that exists or raises a +ResourceNotFoundError. One use for such a filesystem would be to selectively override a set of files, to customize behaviour. For example, to create a filesystem that could be used @@ -61,11 +62,11 @@ from fs.errors import ResourceNotFoundError class MultiFS(FS): - """A MultiFS is a filesystem that delegates to a sequence of other filesystems. - Operations on the MultiFS will try each 'child' filesystem in order, until it - succeeds. In effect, creating a filesystem that combines the files and dirs of - its children. + """A filesystem that delegates to a sequence of other filesystems. + Operations on the MultiFS will try each 'child' filesystem in order, until + it succeeds. In effect, creating a filesystem that combines the files and + dirs of its children. """ def __init__(self): |