Show More
@@ -475,9 +475,9 b' class fncache(object):' | |||||
475 | self._load() |
|
475 | self._load() | |
476 | return iter(self.entries) |
|
476 | return iter(self.entries) | |
477 |
|
477 | |||
478 |
class _fncachevfs(vfsmod.abstractvfs, vfsmod. |
|
478 | class _fncachevfs(vfsmod.abstractvfs, vfsmod.proxyvfs): | |
479 | def __init__(self, vfs, fnc, encode): |
|
479 | def __init__(self, vfs, fnc, encode): | |
480 |
vfsmod. |
|
480 | vfsmod.proxyvfs.__init__(self, vfs) | |
481 | self.fncache = fnc |
|
481 | self.fncache = fnc | |
482 | self.encode = encode |
|
482 | self.encode = encode | |
483 |
|
483 |
@@ -441,7 +441,7 b' class vfs(abstractvfs):' | |||||
441 |
|
441 | |||
442 | opener = vfs |
|
442 | opener = vfs | |
443 |
|
443 | |||
444 |
class |
|
444 | class proxyvfs(object): | |
445 | def __init__(self, vfs): |
|
445 | def __init__(self, vfs): | |
446 | self.vfs = vfs |
|
446 | self.vfs = vfs | |
447 |
|
447 | |||
@@ -453,11 +453,11 b' class auditvfs(object):' | |||||
453 | def options(self, value): |
|
453 | def options(self, value): | |
454 | self.vfs.options = value |
|
454 | self.vfs.options = value | |
455 |
|
455 | |||
456 |
class filtervfs(abstractvfs, |
|
456 | class filtervfs(abstractvfs, proxyvfs): | |
457 | '''Wrapper vfs for filtering filenames with a function.''' |
|
457 | '''Wrapper vfs for filtering filenames with a function.''' | |
458 |
|
458 | |||
459 | def __init__(self, vfs, filter): |
|
459 | def __init__(self, vfs, filter): | |
460 |
|
|
460 | proxyvfs.__init__(self, vfs) | |
461 | self._filter = filter |
|
461 | self._filter = filter | |
462 |
|
462 | |||
463 | def __call__(self, path, *args, **kwargs): |
|
463 | def __call__(self, path, *args, **kwargs): | |
@@ -471,11 +471,11 b' class filtervfs(abstractvfs, auditvfs):' | |||||
471 |
|
471 | |||
472 | filteropener = filtervfs |
|
472 | filteropener = filtervfs | |
473 |
|
473 | |||
474 |
class readonlyvfs(abstractvfs, |
|
474 | class readonlyvfs(abstractvfs, proxyvfs): | |
475 | '''Wrapper vfs preventing any writing.''' |
|
475 | '''Wrapper vfs preventing any writing.''' | |
476 |
|
476 | |||
477 | def __init__(self, vfs): |
|
477 | def __init__(self, vfs): | |
478 |
|
|
478 | proxyvfs.__init__(self, vfs) | |
479 |
|
479 | |||
480 | def __call__(self, path, mode='r', *args, **kw): |
|
480 | def __call__(self, path, mode='r', *args, **kw): | |
481 | if mode not in ('r', 'rb'): |
|
481 | if mode not in ('r', 'rb'): |
General Comments 0
You need to be logged in to leave comments.
Login now