21 Jul
2004
21 Jul
'04
4:10 p.m.
With filesystem, you can do filesystem::path P(....); filesystem::ofstream S; if (!filesystem::exists(P)) { S.open(P); } But isn't there a race condition here which could lead to a file created by another process being wiped out, or added to? Is there a way to get ofstream::open to fail if the file already exists? It succeeds on VC7.1 but in some situations I don't want it to succeed. Cheers Russell