Show More
@@ -360,21 +360,21 b' class auditvfs(object):' | |||
|
360 | 360 | |
|
361 | 361 | mustaudit = property(_getmustaudit, _setmustaudit) |
|
362 | 362 | |
|
363 | class filtervfs(abstractvfs): | |
|
363 | class filtervfs(abstractvfs, auditvfs): | |
|
364 | 364 | '''Wrapper vfs for filtering filenames with a function.''' |
|
365 | 365 | |
|
366 |
def __init__(self, |
|
|
366 | def __init__(self, vfs, filter): | |
|
367 | auditvfs.__init__(self, vfs) | |
|
367 | 368 | self._filter = filter |
|
368 | self._orig = opener | |
|
369 | 369 | |
|
370 | 370 | def __call__(self, path, *args, **kwargs): |
|
371 |
return self. |
|
|
371 | return self.vfs(self._filter(path), *args, **kwargs) | |
|
372 | 372 | |
|
373 | 373 | def join(self, path): |
|
374 | 374 | if path: |
|
375 |
return self. |
|
|
375 | return self.vfs.join(self._filter(path)) | |
|
376 | 376 | else: |
|
377 |
return self. |
|
|
377 | return self.vfs.join(path) | |
|
378 | 378 | |
|
379 | 379 | filteropener = filtervfs |
|
380 | 380 |
General Comments 0
You need to be logged in to leave comments.
Login now