MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / copyfileobj

Function copyfileobj

tools/python-3.11.9-amd64/Lib/shutil.py:189–200  ·  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

187 fdst_write(mv)
188
189def copyfileobj(fsrc, fdst, length=0):
190 """copy data from file-like object fsrc to file-like object fdst"""
191 if not length:
192 length = COPY_BUFSIZE
193 # Localize variable access to minimize overhead.
194 fsrc_read = fsrc.read
195 fdst_write = fdst.write
196 while True:
197 buf = fsrc_read(length)
198 if not buf:
199 break
200 fdst_write(buf)
201
202def _samefile(src, dst):
203 # Macintosh, Unix.

Callers 2

copyfileFunction · 0.70
_unpack_zipfileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected