4 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
16 def clFiles(file_dict, directory):
18 filelist.append("<VirtualDirectory Name=\"%s\">" %os.path.basename(directory))
19 for f in file_dict[directory]["files"]:
20 filelist.append("<File Name=\"%s\"/>" %os.path.join(directory, f))
21 for d in file_dict[directory]["dirs"]:
22 filelist += clFiles(file_dict, os.path.join(directory, d))
23 filelist.append("</VirtualDirectory>")
26 def findSources(path):
28 for root, dirs, files in os.walk(path):
29 if root.find("svn") == -1:
30 file_dict[root] = {"dirs": [], "files": []}
32 if dir.find("svn") == -1:
33 file_dict[root]["dirs"].append(dir)
35 if file.endswith(const.EXTENSION_FILTER):
36 file_dict[root]["files"].append(file)