Thanks to visit codestin.com Credit goes to github.com
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 7e777c5 commit d9a2e58Copy full SHA for d9a2e58
1 file changed
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 reads and writes in a loop.
544
+:func:`shutil.copy2` uses the native ``CopyFile2`` call on Windows, which is the most
545
+efficient method, supports copy-on-write, and preserves 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