From ff8349979c2ca4e442afc583e1217519611c6c48 Mon Sep 17 00:00:00 2001 From: Barney Gale Date: Tue, 5 Nov 2024 18:43:43 +0000 Subject: [PATCH] GH-124985: Document that `pathlib.Path.copy()` uses copy-on-write. (#125861) --- Doc/library/pathlib.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index b6fb36554f7..a42ac1f8bcd 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