I need to achieve an atomic move to replace an existing file. Is there anyway to do this using boost::filesystem? I thought rename would do this but it throws the following exception: " boost::filesystem::rename: File exists:" when the target file exists.

-Sanjit