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
860467c3
Commit
860467c3
authored
Sep 05, 2008
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweaks
parent
dc82b110
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fs/fs.py
+2
-2
No files found.
fs/fs.py
View file @
860467c3
...
@@ -269,14 +269,14 @@ def _iteratepath(path, numsplits=None):
...
@@ -269,14 +269,14 @@ def _iteratepath(path, numsplits=None):
return
filter
(
lambda
p
:
bool
(
p
),
path
.
split
(
'/'
,
numsplits
))
return
filter
(
lambda
p
:
bool
(
p
),
path
.
split
(
'/'
,
numsplits
))
def
print_fs
(
fs
,
path
=
"/"
,
max_levels
=
2
,
indent
=
' '
*
2
):
def
print_fs
(
fs
,
path
=
"/"
,
max_levels
=
5
,
indent
=
' '
*
2
):
"""Prints a filesystem listing to stdout (including sub dirs). Useful as a debugging aid.
"""Prints a filesystem listing to stdout (including sub dirs). Useful as a debugging aid.
Be careful about printing a OSFS, or any other large filesystem.
Be careful about printing a OSFS, or any other large filesystem.
Without max_levels set, this function will traverse the entire directory tree.
Without max_levels set, this function will traverse the entire directory tree.
fs -- A filesystem object
fs -- A filesystem object
path -- Path of root to list (default "/")
path -- Path of root to list (default "/")
max_levels -- Maximum levels of dirs to list (default
None for no maximum)
max_levels -- Maximum levels of dirs to list (default
5), set to None for no maximum
indent -- String to indent each directory level (default two spaces)
indent -- String to indent each directory level (default two spaces)
"""
"""
...
...
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