Lines Matching refs:fsrc
86 def _fastcopy_fcopyfile(fsrc, fdst, flags):
91 infd = fsrc.fileno()
99 err.filename = fsrc.name
106 def _fastcopy_sendfile(fsrc, fdst):
115 # - fsrc and fdst may be open in "t"(ext) mode
116 # - fsrc may be a BufferedReader (which hides unread data in a buffer),
122 infd = fsrc.fileno()
147 err.filename = fsrc.name
170 def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
172 *fsrc* must support readinto() method and both files must be
176 fsrc_readinto = fsrc.readinto
189 def copyfileobj(fsrc, fdst, length=0):
190 """copy data from file-like object fsrc to file-like object fdst"""
194 fsrc_read = fsrc.read
256 with open(src, 'rb') as fsrc:
262 _fastcopy_fcopyfile(fsrc, fdst, posix._COPYFILE_DATA)
269 _fastcopy_sendfile(fsrc, fdst)
276 _copyfileobj_readinto(fsrc, fdst, min(file_size, COPY_BUFSIZE))
279 copyfileobj(fsrc, fdst)