MCPcopy Create free account
hub / github.com/MegEngine/MegCC / getfiles

Function getfiles

script/format.py:94–105  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

92 format_type = [".cpp", ".c", ".h", ".cu", ".cuh", ".inl"]
93
94 def getfiles(path):
95 rst = []
96 for p in os.listdir(path):
97 p = os.path.join(path, p)
98 if os.path.isdir(p):
99 if exclude_dir.count(p) == 1:
100 continue
101 rst += getfiles(p)
102 elif (os.path.isfile(p) and not os.path.islink(p)
103 and os.path.splitext(p)[1] in format_type):
104 rst.append(p)
105 return rst
106
107 files = []
108 for path in args.path:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected