Boost logo

Boost Users :

Subject: [Boost-users] [boost][filesystem] Rename throws exception if target file exists
From: Sanjit Jhala (sjhalaz_at_[hidden])
Date: 2010-05-08 12:14:38


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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net