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
82887d81
Commit
82887d81
authored
May 26, 2011
by
willmcgugan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch from Andrew to allow infinite recursion on fstree
parent
47379906
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
fs/commands/fstree.py
+6
-2
No files found.
fs/commands/fstree.py
View file @
82887d81
...
...
@@ -14,7 +14,7 @@ Recursively display the contents of PATH in an ascii tree"""
def
get_optparse
(
self
):
optparse
=
super
(
FSTree
,
self
)
.
get_optparse
()
optparse
.
add_option
(
'-l'
,
'--level'
,
dest
=
'depth'
,
type
=
"int"
,
default
=
5
,
help
=
"Descend only LEVEL directories deep"
,
metavar
=
"LEVEL"
)
help
=
"Descend only LEVEL directories deep
(-1 for infinite)
"
,
metavar
=
"LEVEL"
)
optparse
.
add_option
(
'-g'
,
'--gui'
,
dest
=
'gui'
,
action
=
'store_true'
,
default
=
False
,
help
=
"browse the tree with a gui"
)
optparse
.
add_option
(
'-a'
,
'--all'
,
dest
=
'all'
,
action
=
'store_true'
,
default
=
False
,
...
...
@@ -39,9 +39,13 @@ Recursively display the contents of PATH in an ascii tree"""
fs
=
fs
.
opendir
(
path
)
browse
(
fs
,
hide_dotfiles
=
not
options
.
all
)
else
:
if
options
.
depth
<
0
:
max_levels
=
None
else
:
max_levels
=
options
.
depth
print_fs
(
fs
,
path
or
''
,
file_out
=
self
.
output_file
,
max_levels
=
options
.
depth
,
max_levels
=
max_levels
,
terminal_colors
=
self
.
terminal_colors
,
hide_dotfiles
=
not
options
.
all
,
dirs_first
=
options
.
dirsfirst
)
...
...
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