libsaria.path() with an FSTree()

I now have a function to walk all files in a filesystem and make an
FSTree().
This commit is contained in:
Bryan Schumaker 2010-11-09 13:53:57 -05:00
parent 7ad74e6dca
commit 13d4ba7710
1 changed files with 2 additions and 3 deletions

View File

@ -82,10 +82,9 @@ def make_tree_rest(path):
tree = Tree()
count = 0
for root,dirs,files in walk(path):
stripped_root = root.strip(sep)
split_root = root.split(sep)
split = root.split()
for file in files:
tree.insert(split_root + [file])
tree.insert_path_split(root, file)
count += 1
tree.value = count
return tree