Boost logo

Boost Users :

Subject: Re: [Boost-users] using boost::filesystem::delete
From: Scott McMurray ([hidden])
Date: 2009-03-03 14:05:13

On Tue, Mar 3, 2009 at 12:43, Everton Patitucci <patucci_at_[hidden]> wrote:
>> I have a boost::filesystem::wpath object. I need to firstly check if the
>> file exists, and secondly delete and check the file has been deleted.
>> How would I go about this?
>> I've loked at the reference and carn't seem to make sense, are thee any
>> examples of both these functions?
>> Sean.
> removing a file...
> sixth method.

Remove doesn't consider file not found to be an error, so why check?
Checking -- either before or after -- introduces race conditions. If
remove doesn't throw, then the file was gone at that point.
Confirming that seems like a waste of effort.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at