diff options
author | Max Kellermann <max@duempel.org> | 2015-03-23 22:42:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-03-23 22:51:33 +0100 |
commit | 7f6e1fbc8d463308e374bb7d9b112cd9f452f76e (patch) | |
tree | 594b1bcda0447cef890d071ea558c573df831ec9 /src/fs/io/FileOutputStream.hxx | |
parent | 06827cfcf14f33578432b1c5435f827caaf1de6f (diff) | |
download | mpd-7f6e1fbc8d463308e374bb7d9b112cd9f452f76e.tar.gz mpd-7f6e1fbc8d463308e374bb7d9b112cd9f452f76e.tar.xz mpd-7f6e1fbc8d463308e374bb7d9b112cd9f452f76e.zip |
fs/io/FileOutputStream: add class AppendFileOutputStream
Diffstat (limited to 'src/fs/io/FileOutputStream.hxx')
-rw-r--r-- | src/fs/io/FileOutputStream.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx index ce53427e2..9decb6f00 100644 --- a/src/fs/io/FileOutputStream.hxx +++ b/src/fs/io/FileOutputStream.hxx @@ -135,4 +135,16 @@ public: void Cancel(); }; +class AppendFileOutputStream final : public BaseFileOutputStream { +public: + AppendFileOutputStream(Path _path, Error &error); + + ~AppendFileOutputStream() { + if (IsDefined()) + Close(); + } + + bool Commit(Error &error); +}; + #endif |