GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-142407: Clarify copy performance on Windows in shutil docs (GH-142… · thunder-coding/cpython@8e0154d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Doc/library
    • shutil.rst
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/library/shutil.rst‎

Copy file name to clipboardExpand all lines: Doc/library/shutil.rst
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,9 @@ On Solaris :func:`os.sendfile` is used.
540540

541541
On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB
542542
instead of 64 KiB) and a :func:`memoryview`-based variant of
543-
:func:`shutil.copyfileobj` is used.
543+
: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.
544546

545547
If the fast-copy operation fails and no data was written in the destination
546548
file then shutil will silently fallback on using less efficient

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.