MCPcopy Create free account
hub / github.com/datapane/datapane / unix_decompress_file

Function unix_decompress_file

python-client/src/datapane/common/ops_utils.py:62–69  ·  view source on GitHub ↗

(UNIX only) Return path to a compressed version of the input filename

(f_name: NPath)

Source from the content-addressed store, hash-verified

60
61@contextmanager
62def unix_decompress_file(f_name: NPath) -> t.Generator[str, None, None]:
63 """(UNIX only) Return path to a compressed version of the input filename"""
64 subprocess.run(["gunzip", "-kf", f_name], check=True)
65 f_name_gz = f"{f_name}.gz"
66 try:
67 yield f_name_gz
68 finally:
69 os.unlink(f_name_gz)
70
71
72@contextmanager

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected