mirror of
https://github.com/python/cpython.git
synced 2026-02-16 04:11:55 +00:00
gh-142407: Clarify copy performance on Windows in shutil docs (GH-142408)
This commit is contained in:
parent
7e777c587f
commit
d9a2e587fc
1 changed files with 3 additions and 1 deletions
|
|
@ -540,7 +540,9 @@ On Solaris :func:`os.sendfile` is used.
|
|||
|
||||
On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB
|
||||
instead of 64 KiB) and a :func:`memoryview`-based variant of
|
||||
:func:`shutil.copyfileobj` is used.
|
||||
:func:`shutil.copyfileobj` is used, which is still reads and writes in a loop.
|
||||
:func:`shutil.copy2` uses the native ``CopyFile2`` call on Windows, which is the most
|
||||
efficient method, supports copy-on-write, and preserves metadata.
|
||||
|
||||
If the fast-copy operation fails and no data was written in the destination
|
||||
file then shutil will silently fallback on using less efficient
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue