libsaria.path FSTree()

path should use an FSTree() instead of a Tree()
This commit is contained in:
Bryan Schumaker 2010-11-09 20:06:46 -05:00
parent 27d3baef27
commit 99ea5fd3ed
1 changed files with 7 additions and 10 deletions

View File

@ -20,7 +20,7 @@ plugin_dir = None
make_tree = None
shutil = None
Tree = None
FSTree = None
s_dir = None
p_dir = None
@ -72,20 +72,17 @@ def mkdir(path):
def make_tree_once(path):
global Tree
from trees import Tree
global FSTree
from trees import FSTree
global make_tree
make_tree = make_tree_rest
return make_tree(path)
def make_tree_rest(path):
global Tree
tree = Tree()
count = 0
global FSTree
tree = FSTree()
for root,dirs,files in walk(path):
split = root.split()
split = root.split(sep)
for file in files:
tree.insert_path_split(root, file)
count += 1
tree.value = count
tree.insert_path_split(split, file)
return tree
make_tree = make_tree_once