Boost logo

Boost :

From: Christian Engström (christian.engstrom_at_[hidden])
Date: 2004-01-12 07:18:00


If I have the statement

   boost::filesystem::rename("a.xyz", "subdir");

and "subdir" is an existing directory, the documentation says that the
"a.xyz" file should be moved to the target directory. When I run this
code on Windows, however, the rename function seems to behave exactly
the way it would if "subdir" had been a non-directory file, i.e.: the
rename function throws an exception with the error message "Cannot
create a file when that file already exists".

Which should it be? (I would personally prefer the semantics that the
implementation seems to have rather than the documented semantics, so
that is why I suggested "documentation error" in the subject line :) )

I am using MSVC 6.0 under Windows XP, and version 1.30.0 of the Boost
library. (I know there is a 1.30.2 available as well, but I see nothing
about this in the release notes on the Boost front page, so I am
assuming that the has not changed since 1.30.0)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk