MCPcopy Index your code
hub / github.com/python/cpython / copyfileobj

Function copyfileobj

Lib/shutil.py:249–257  ·  view source on GitHub ↗

copy data from file-like object fsrc to file-like object fdst

(fsrc, fdst, length=0)

Source from the content-addressed store, hash-verified

247 fdst_write(mv)
248
249def copyfileobj(fsrc, fdst, length=0):
250 """copy data from file-like object fsrc to file-like object fdst"""
251 if not length:
252 length = COPY_BUFSIZE
253 # Localize variable access to minimize overhead.
254 fsrc_read = fsrc.read
255 fdst_write = fdst.write
256 while buf := fsrc_read(length):
257 fdst_write(buf)
258
259def _samefile(src, dst):
260 # Macintosh, Unix.

Callers 2

copyfileFunction · 0.70
_unpack_zipfileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…