Can I create and open a file only if it does not exist ?

6 Sep
2010
6 Sep
'10
12:33 a.m.
Hello I see file_descriptor_sink uses the openmode flags from std::ios_base, and also file class actually calls the open function standard C++ basic_filebuf. I would like to open a temporary file (generated with unique_path) only if it does not exist, as if by POSIX open() with O_CREAT | E_EXCL, and no combination of ios_base::openmode flags allows for that. Is there a way in boost to create and open a file only if it does not exist ? Thank you, Timothy Madden
5445
Age (days ago)
5445
Last active (days ago)
0 comments
1 participants
participants (1)
-
Timothy Madden