Skip to content

Commit

Permalink
Explain what copying as if files are opened as binary means
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-v committed Jun 6, 2022
1 parent bcb339d commit 069651d
Showing 1 changed file with 5 additions and 2 deletions.
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 comments on commit 069651d

Please sign in to comment.