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()
|
tree = Tree()
|
||||||
count = 0
|
count = 0
|
||||||
for root,dirs,files in walk(path):
|
for root,dirs,files in walk(path):
|
||||||
stripped_root = root.strip(sep)
|
split = root.split()
|
||||||
split_root = root.split(sep)
|
|
||||||
for file in files:
|
for file in files:
|
||||||
tree.insert(split_root + [file])
|
tree.insert_path_split(root, file)
|
||||||
count += 1
|
count += 1
|
||||||
tree.value = count
|
tree.value = count
|
||||||
return tree
|
return tree
|
||||||
|
|
Loading…
Reference in New Issue