MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / cat_files

Function cat_files

test/utils_shared.py:600–605  ·  view source on GitHub ↗

Cat multiple files into dest.

(dest, *sources)

Source from the content-addressed store, hash-verified

598
599
600def cat_files(dest, *sources):
601 """Cat multiple files into dest."""
602 with open(dest, "wb") as fdst:
603 for src in sources:
604 with open(src, "rb") as fsrc:
605 shutil.copyfileobj(fsrc, fdst)
606
607
608@contextlib.contextmanager

Callers 2

Calls

no outgoing calls

Tested by 2