MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / removeLargeFiles

Function removeLargeFiles

tools/daca2-download.py:125–141  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

123
124
125def removeLargeFiles(path):
126 for g in glob.glob(path + '*'):
127 if g == '.' or g == '..':
128 continue
129 if os.path.islink(g):
130 continue
131 if os.path.isdir(g):
132 removeLargeFiles(g + '/')
133 elif os.path.isfile(g):
134 # remove large files
135 statinfo = os.stat(g)
136 if statinfo.st_size > 100000:
137 os.remove(g)
138
139 # remove non-source files
140 elif not accept_filename(g):
141 os.remove(g)
142
143
144def downloadpackage(filepath, outpath):

Callers 1

downloadpackageFunction · 0.85

Calls 1

accept_filenameFunction · 0.85

Tested by

no test coverage detected