We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3db7bf2 commit 4ee139dCopy full SHA for 4ee139d
Doc/library/shutil.rst
@@ -540,7 +540,9 @@ On Solaris :func:`os.sendfile` is used.
540
541
On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB
542
instead of 64 KiB) and a :func:`memoryview`-based variant of
543
-:func:`shutil.copyfileobj` is used.
+:func:`shutil.copyfileobj` is used, which is still read and write in a loop.
544
+:func:`shutil.copy2` uses native call `CopyFile2` on windows and it is the most
545
+efficient and support copy-on-write, but preserve the metadata.
546
547
If the fast-copy operation fails and no data was written in the destination
548
file then shutil will silently fallback on using less efficient
0 commit comments