FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-142407: Update shutil.rst to clarify copy performance on Windows by NewUserHa · Pull Request #142408 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 3 additions & 1 deletion Doc/library/shutil.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

Back | FazBrowse Home | New Git URL