|
Boost Users : |
Subject: [Boost-users] Can I create and open a file only if it does not exist ?
From: Timothy Madden (terminatorul_at_[hidden])
Date: 2010-09-05 18:33:08
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
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