Visitar URL original
Doc: Update references and examples of old, unsupported OSes and uarches by CAM-Gerlach · Pull Request #92791 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Doc: Add note to FAQ about copying file ADS/forks & metadata
  • Loading branch information
CAM-Gerlach committed May 16, 2022
commit 2a67a2a172c0596bb3d4498a96b791b9f5065e23
7 changes: 7 additions & 0 deletions Doc/faq/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ How do I copy a file?
---------------------

The :mod:`shutil` module contains a :func:`~shutil.copyfile` function.
Comment thread
serhiy-storchaka marked this conversation as resolved.
Note that on Windows NTFS volumes, it does not copy
`alternate data streams
<https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)>`_
nor `resource forks <https://en.wikipedia.org/wiki/Resource_fork>`__
on macOS HFS+ volumes, though both are now rarely used.
It also doesn't copy file permissions and metadata, though using
:func:`shutil.copy2` instead will preserve most (though not all) of it.


How do I read (or write) binary data?
Expand Down