10000 gh-93180: Update documentation of `os.copy_file_range` by illia-v · Pull Request #93182 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-93180: Update documentation of os.copy_file_range #93182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 8, 2022
Prev Previous commit
Next Next commit
Explain what copying as if files are opened as binary means
  • Loading branch information
illia-v committed Jun 6, 2022
commit 069651d65f56beeda24da5edf3cdb46cdae4f71c
7 changes: 5 additions & 2 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,11 @@ as internal buffering of data.
some filesystems could implement extra optimizations, such as the use of
reflinks (i.e., two or more inodes that share pointers to the same
copy-on-write disk blocks; supported file systems include btrfs and XFS)
and server-side copy (in the case of NFS). The copy is done as if
both files are opened as binary.
and server-side copy (in the case of NFS).

The copy is done as if both files are opened in binary mode, meaning that
this function will not convert encodings or line endings even if you have
opened the files in text mode for that as described in :ref:`tut-files`.

The return value is the amount of bytes copied. This could be less than the
amount requested.
Expand Down
0