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:
parent
7ad74e6dca
commit
13d4ba7710
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue