cpython/Lib/pathlib
Barney Gale 20d5b84f57
GH-73991: Add follow_symlinks argument to pathlib.Path.copy() (#120519)
Add support for not following symlinks in `pathlib.Path.copy()`.

On Windows we add the `COPY_FILE_COPY_SYMLINK` flag is following symlinks is disabled. If the source is symlink to a directory, this call will fail with `ERROR_ACCESS_DENIED`. In this case we add `COPY_FILE_DIRECTORY` to the flags and retry. This can fail on old Windowses, which we note in the docs.

No news as `copy()` was only just added.
2024-06-19 00:59:54 +00:00
..
__init__.py Move pathlib implementation out of __init__.py (#118582) 2024-05-05 20:57:19 +01:00
_abc.py GH-73991: Add follow_symlinks argument to pathlib.Path.copy() (#120519) 2024-06-19 00:59:54 +00:00
_local.py GH-73991: Add follow_symlinks argument to pathlib.Path.copy() (#120519) 2024-06-19 00:59:54 +00:00
_os.py GH-73991: Add follow_symlinks argument to pathlib.Path.copy() (#120519) 2024-06-19 00:59:54 +00:00