fs/io/FileOutputStream: add mode APPEND_OR_CREATE

This commit is contained in:
Max Kellermann
2016-09-04 13:00:51 +02:00
parent d775f13a03
commit f600e226da
2 changed files with 21 additions and 6 deletions

View File

@@ -69,6 +69,12 @@ public:
* not, an exception is thrown.
*/
APPEND_EXISTING,
/**
* Like #APPEND_EXISTING, but create the file if it
* does not exist.
*/
APPEND_OR_CREATE,
};
private:
@@ -98,7 +104,7 @@ public:
private:
void OpenCreate();
void OpenAppendExisting();
void OpenAppend(bool create);
bool Close() {
assert(IsDefined());