Skip to content

Commit

Permalink
Re #132 Extend Haddock docs to be express about Windows limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Sep 26, 2023
1 parent e7988c9 commit 1751cfa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions System/Directory.hs
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,13 @@ renameDirectory opath npath = do
{- |@'renameFile' old new@ changes the name of an existing file system
object from /old/ to /new/. If the /new/ object already exists, it is
replaced by the /old/ object. Neither path may refer to an existing
directory. A conformant implementation need not support renaming files
in all situations (e.g. renaming across different physical devices), but
the constraints must be documented.
directory.
A conformant implementation need not support renaming files in all situations
(e.g. renaming across different physical devices), but the constraints must be
documented. On Windows, this does not support renaming across different physical
devices; if you are looking to do so, consider using 'copyFileWithMetadata' and
'removeFile'.
On Windows, this calls @MoveFileEx@ with @MOVEFILE_REPLACE_EXISTING@ set,
which is not guaranteed to be atomic
Expand Down
10 changes: 7 additions & 3 deletions System/Directory/OsPath.hs
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,13 @@ renameDirectory opath npath =
{- |@'renameFile' old new@ changes the name of an existing file system
object from /old/ to /new/. If the /new/ object already exists, it is
replaced by the /old/ object. Neither path may refer to an existing
directory. A conformant implementation need not support renaming files
in all situations (e.g. renaming across different physical devices), but
the constraints must be documented.
directory.
A conformant implementation need not support renaming files in all situations
(e.g. renaming across different physical devices), but the constraints must be
documented. On Windows, this does not support renaming across different physical
devices; if you are looking to do so, consider using 'copyFileWithMetadata' and
'removeFile'.
On Windows, this calls @MoveFileEx@ with @MOVEFILE_REPLACE_EXISTING@ set,
which is not guaranteed to be atomic
Expand Down

0 comments on commit 1751cfa

Please sign in to comment.