Skip to content

Commit

Permalink
bpo-28356: Document os.rename() behavior on Windows for differing vol…
Browse files Browse the repository at this point in the history
…umes (pythonGH-27376)
  • Loading branch information
rhyn0 authored Jan 9, 2023
1 parent 61762b9 commit e098137
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,8 @@ features:
will fail with an :exc:`OSError` subclass in a number of cases:

On Windows, if *dst* exists a :exc:`FileExistsError` is always raised.
The operation may fail if *src* and *dst* are on different filesystems. Use
:func:`shutil.move` to support moves to a different filesystem.

On Unix, if *src* is a file and *dst* is a directory or vice-versa, an
:exc:`IsADirectoryError` or a :exc:`NotADirectoryError` will be raised
Expand Down

0 comments on commit e098137

Please sign in to comment.