MCPcopy
hub / github.com/pex-tool/pex / temporary_dir

Function temporary_dir

pex/common.py:545–552  ·  view source on GitHub ↗
(cleanup=True)

Source from the content-addressed store, hash-verified

543
544@contextlib.contextmanager
545def temporary_dir(cleanup=True):
546 # type: (bool) -> Iterator[str]
547 td = tempfile.mkdtemp()
548 try:
549 yield td
550 finally:
551 if cleanup:
552 safe_rmtree(td)
553
554
555def safe_mkdtemp(**kw):

Calls 1

safe_rmtreeFunction · 0.85