diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-09-28 07:06:12 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-09-28 07:06:12 +0000 |
commit | 1815771ac153abf3391de3d2f30fea7ed6619dfc (patch) | |
tree | bef643eb8c999f14eed8e2cc00c7e4d10a49c04e /fs/wrapfs | |
parent | a2a6f64f57e558f73df2aac6f0991c68cca2dae5 (diff) | |
download | pyfilesystem-1815771ac153abf3391de3d2f30fea7ed6619dfc.tar.gz |
WrapFS: remove support for listdir(info=True)
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@450 67cdc799-7952-0410-af00-57a81ceafa0f
Diffstat (limited to 'fs/wrapfs')
-rw-r--r-- | fs/wrapfs/__init__.py | 22 | ||||
-rw-r--r-- | fs/wrapfs/lazyfs.py | 2 |
2 files changed, 8 insertions, 16 deletions
diff --git a/fs/wrapfs/__init__.py b/fs/wrapfs/__init__.py index 9a9c3fb..400fe75 100644 --- a/fs/wrapfs/__init__.py +++ b/fs/wrapfs/__init__.py @@ -155,24 +155,16 @@ class WrapFS(FS): elif not callable(wildcard): wildcard_re = re.compile(fnmatch.translate(wildcard)) wildcard = lambda fn:bool (wildcard_re.match(fn)) - info = kwds.get("info",False) entries = [] enc_path = self._encode(path) for e in self.wrapped_fs.listdir(enc_path,**kwds): - if info: - e = e.copy() - fullnm = pathjoin(enc_path,e["name"]) - e["name"] = basename(self._decode(fullnm)) - if not wildcard(e["name"]): - continue - else: - e = basename(self._decode(pathjoin(enc_path,e))) - if not wildcard(e): - continue - if full: - e = pathjoin(path,e) - elif absolute: - e = abspath(pathjoin(path,e)) + e = basename(self._decode(pathjoin(enc_path,e))) + if not wildcard(e): + continue + if full: + e = pathjoin(path,e) + elif absolute: + e = abspath(pathjoin(path,e)) entries.append(e) return entries diff --git a/fs/wrapfs/lazyfs.py b/fs/wrapfs/lazyfs.py index a9a6b97..1825c76 100644 --- a/fs/wrapfs/lazyfs.py +++ b/fs/wrapfs/lazyfs.py @@ -76,7 +76,7 @@ class LazyFS(WrapFS): wrapped_fs = property(_get_wrapped_fs,_set_wrapped_fs) def setcontents(self, path, data): - return self.wrapped_fs.setcontents(path,data) + return self.wrapped_fs.setcontents(path, data) def close(self): if not self.closed: |