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

This commit is contained in:
Max Kellermann 2019-01-21 21:09:34 +01:00
parent 4ba9357a9c
commit dee8872395
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,12 @@
FileOutputStream::FileOutputStream(Path _path, Mode _mode)
:path(_path), mode(_mode)
{
Open();
}
inline void
FileOutputStream::Open()
{
switch (mode) {
case Mode::CREATE:

View File

@ -133,6 +133,7 @@ public:
private:
void OpenCreate(bool visible);
void OpenAppend(bool create);
void Open();
bool Close() noexcept {
assert(IsDefined());