3 Mar
2009
3 Mar
'09
7:05 p.m.
On Tue, Mar 3, 2009 at 12:43, Everton Patitucci
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... http://www.boost.org/doc/libs/1_38_0/libs/filesystem/doc/reference.html#Oper... 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.