MCPcopy Index your code
hub / github.com/RustPython/RustPython / copyfile

Method copyfile

Lib/http/server.py:928–942  ·  view source on GitHub ↗

Copy all data between two file objects. The SOURCE argument is a file object open for reading (or anything with a read() method) and the DESTINATION argument is a file object open for writing (or anything with a write() method). The only reason for overridin

(self, source, outputfile)

Source from the content-addressed store, hash-verified

926 return path
927
928 def copyfile(self, source, outputfile):
929 """Copy all data between two file objects.
930
931 The SOURCE argument is a file object open for reading
932 (or anything with a read() method) and the DESTINATION
933 argument is a file object open for writing (or
934 anything with a write() method).
935
936 The only reason for overriding this would be to change
937 the block size or perhaps to replace newlines by CRLF
938 -- note however that this the default server uses this
939 to copy binary data as well.
940
941 """
942 shutil.copyfileobj(source, outputfile)
943
944 def guess_type(self, path):
945 """Guess the type of a file.

Calls

no outgoing calls