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

Function getfiles

tools/format.py:94–106  ·  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 rst += getfiles(p)
100 elif (
101 os.path.isfile(p)
102 and not os.path.islink(p)
103 and os.path.splitext(p)[1] in format_type
104 ):
105 rst.append(p)
106 return rst
107
108 files = []
109 for path in args.path:

Callers 1

mainFunction · 0.85

Calls 2

joinMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected