MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / should_ignore

Function should_ignore

tools/file_packager.py:156–172  ·  view source on GitHub ↗

Return True if packager should ignore the given file. We do not want to preload/embed a file if it is hidden (Win32) or if it matches any pattern specified in --exclude

(fullname)

Source from the content-addressed store, hash-verified

154
155
156def should_ignore(fullname):
157 """Return True if packager should ignore the given file.
158
159 We do not want to preload/embed a file if it is hidden (Win32) or
160 if it matches any pattern specified in --exclude
161 """
162 if has_hidden_attribute(fullname):
163 return True
164 ignored = False
165 for pattern in excluded_patterns:
166 if pattern.startswith("!"):
167 if fnmatch.fnmatch(fullname, pattern[1:]):
168 ignored = False
169 else:
170 if fnmatch.fnmatch(fullname, pattern):
171 ignored = True
172 return ignored
173
174
175def add(mode, rootpathsrc, rootpathdst):

Callers 2

addFunction · 0.85
mainFunction · 0.85

Calls 1

has_hidden_attributeFunction · 0.85

Tested by

no test coverage detected