Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
169
def
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
175
def
read_binary(file_path):
Callers
15
main
Function · 0.90
version_string
Function · 0.90
apply_user_settings
Function · 0.90
write_file
Function · 0.90
main
Function · 0.90
test_emcc_generate_config
Method · 0.90
test_esm
Method · 0.90
test_esm_source_phase_imports
Method · 0.90
test_esm_worker
Method · 0.90
test_esm_worker_single_file
Method · 0.90
test_esm_closure
Method · 0.90
test_esm_implies_modularize
Method · 0.90
Calls
2
open
Function · 0.50
read
Method · 0.45
Tested by
15
test_emcc_generate_config
Method · 0.72
test_esm
Method · 0.72
test_esm_source_phase_imports
Method · 0.72
test_esm_worker
Method · 0.72
test_esm_worker_single_file
Method · 0.72
test_esm_closure
Method · 0.72
test_esm_implies_modularize
Method · 0.72
test_js_transform
Method · 0.72
test_emsize
Method · 0.72
test_cmake_compile_commands
Method · 0.72
test_prepost
Method · 0.72
test_extern_prepost
Method · 0.72