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

Function get_file_suffix

tools/utils.py:119–128  ·  view source on GitHub ↗

Return the essential suffix of a filename, discarding Unix-style version numbers. For example for 'libz.so.1.2.8' returns '.so'

(filename)

Source from the content-addressed store, hash-verified

117
118
119def get_file_suffix(filename):
120 """Return the essential suffix of a filename, discarding Unix-style version numbers.
121
122 For example for 'libz.so.1.2.8' returns '.so'
123 """
124 while filename:
125 filename, suffix = os.path.splitext(filename)
126 if not suffix[1:].isdigit():
127 return suffix
128 return ''
129
130
131def normalize_path(path):

Callers 7

phase_setupFunction · 0.90
phase_compile_inputsFunction · 0.90
compile_source_fileFunction · 0.90
phase_linker_setupFunction · 0.85
is_fake_dylibFunction · 0.85
checkFunction · 0.85
get_secondary_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected