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

Function get_emscripten_temp_dir

tools/shared.py:480–494  ·  view source on GitHub ↗

Return path of EMSCRIPTEN_TEMP_DIR, creating one if it didn't exist.

()

Source from the content-addressed store, hash-verified

478# temp directory (TEMP_DIR/emscripten_temp).
479@memoize
480def get_emscripten_temp_dir():
481 """Return path of EMSCRIPTEN_TEMP_DIR, creating one if it didn't exist."""
482 global EMSCRIPTEN_TEMP_DIR
483 if not EMSCRIPTEN_TEMP_DIR:
484 EMSCRIPTEN_TEMP_DIR = tempfile.mkdtemp(prefix='emscripten_temp_', dir=TEMP_DIR)
485
486 if not DEBUG_SAVE:
487 def prepare_to_clean_temp(d):
488 def clean_temp():
489 utils.delete_dir(d)
490
491 atexit.register(clean_temp)
492 # this global var might change later
493 prepare_to_clean_temp(EMSCRIPTEN_TEMP_DIR)
494 return EMSCRIPTEN_TEMP_DIR
495
496
497def in_temp(name):

Callers 6

simde_update.pyFile · 0.90
phase_emit_tsdFunction · 0.85
wasm2jsFunction · 0.85
run_wasm_bindgenFunction · 0.85
in_tempFunction · 0.85
get_temp_filesFunction · 0.85

Calls 1

prepare_to_clean_tempFunction · 0.85

Tested by

no test coverage detected