Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
9d33de0d
Commit
9d33de0d
authored
Sep 28, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WrapFS: remove support for listdir(info=True)
parent
ca1c1737
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
+8
-16
fs/wrapfs/__init__.py
+7
-15
fs/wrapfs/lazyfs.py
+1
-1
No files found.
fs/wrapfs/__init__.py
View file @
9d33de0d
...
...
@@ -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
...
...
fs/wrapfs/lazyfs.py
View file @
9d33de0d
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment