MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / CollectPaths

Function CollectPaths

tools/targets/eclipse.py:48–70  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

46
47# collect the build source code path and parent path
48def CollectPaths(paths):
49 all_paths = []
50
51 def ParentPaths(path):
52 ret = os.path.dirname(path)
53 if ret == path or ret == '':
54 return []
55
56 return [ret] + ParentPaths(ret)
57
58 for path in paths:
59 # path = os.path.abspath(path)
60 path = path.replace('\\', '/')
61 all_paths = all_paths + [path] + ParentPaths(path)
62
63 cwd = os.getcwd()
64 for path in os.listdir(cwd):
65 temp_path = cwd.replace('\\', '/') + '/' + path
66 if os.path.isdir(temp_path):
67 all_paths = all_paths + [temp_path]
68
69 all_paths = list(set(all_paths))
70 return sorted(all_paths)
71
72
73'''

Callers 1

GenExcludingFunction · 0.85

Calls 2

ParentPathsFunction · 0.85
setFunction · 0.50

Tested by

no test coverage detected