Commit dee88723 authored by Max Kellermann's avatar Max Kellermann

fs/io/FileOutputStream: move code to Open()

parent 4ba9357a
......@@ -34,6 +34,12 @@
FileOutputStream::FileOutputStream(Path _path, Mode _mode)
:path(_path), mode(_mode)
{
Open();
}
inline void
FileOutputStream::Open()
{
switch (mode) {
case Mode::CREATE:
OpenCreate(false);
......
......@@ -133,6 +133,7 @@ public:
private:
void OpenCreate(bool visible);
void OpenAppend(bool create);
void Open();
bool Close() noexcept {
assert(IsDefined());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment