From: Barney Gale Date: Tue, 5 Nov 2024 18:43:43 +0000 (+0000) Subject: GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861) X-Git-Tag: v3.14.0a2~165 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ff8349979c2ca4e442afc583e1217519611c6c48;p=thirdparty%2FPython%2Fcpython.git GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861) --- diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index b6fb36554f7c..a42ac1f8bcdf 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1592,6 +1592,11 @@ Copying, moving and deleting This argument has no effect when copying files on Windows (where metadata is always preserved). + .. note:: + Where supported by the operating system and file system, this method + performs a lightweight copy, where data blocks are only copied when + modified. This is known as copy-on-write. + .. versionadded:: 3.14