MCPcopy Create free account
hub / github.com/apache/arrow / tmpdir

Function tmpdir

dev/archery/archery/utils/tmpdir.py:24–32  ·  view source on GitHub ↗
(preserve=False, prefix="arrow-archery-", preserve_dir=None)

Source from the content-addressed store, hash-verified

22
23@contextmanager
24def tmpdir(preserve=False, prefix="arrow-archery-", preserve_dir=None):
25 if preserve and preserve_dir is not None:
26 os.makedirs(preserve_dir, exist_ok=True)
27 yield preserve_dir
28 elif preserve:
29 yield mkdtemp(prefix=prefix)
30 else:
31 with TemporaryDirectory(prefix=prefix) as tmp:
32 yield tmp

Callers 3

benchmark_listFunction · 0.90
benchmark_runFunction · 0.90
benchmark_diffFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected