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

Function read_file

tools/utils.py:169–172  ·  view source on GitHub ↗

Read from a file opened in text mode.

(file_path)

Source from the content-addressed store, hash-verified

167
168
169def read_file(file_path):
170 """Read from a file opened in text mode."""
171 with open(file_path, encoding='utf-8') as fh:
172 return fh.read()
173
174
175def read_binary(file_path):

Callers 15

mainFunction · 0.90
version_stringFunction · 0.90
apply_user_settingsFunction · 0.90
write_fileFunction · 0.90
mainFunction · 0.90
test_esmMethod · 0.90
test_esm_workerMethod · 0.90
test_esm_closureMethod · 0.90

Calls 2

openFunction · 0.50
readMethod · 0.45

Tested by 15

test_esmMethod · 0.72
test_esm_workerMethod · 0.72
test_esm_closureMethod · 0.72
test_js_transformMethod · 0.72
test_emsizeMethod · 0.72
test_prepostMethod · 0.72
test_extern_prepostMethod · 0.72