fs/io/FileOutputStream: move code to Open()
This commit is contained in:
parent
4ba9357a9c
commit
dee8872395
|
@ -33,6 +33,12 @@
|
||||||
|
|
||||||
FileOutputStream::FileOutputStream(Path _path, Mode _mode)
|
FileOutputStream::FileOutputStream(Path _path, Mode _mode)
|
||||||
:path(_path), mode(_mode)
|
:path(_path), mode(_mode)
|
||||||
|
{
|
||||||
|
Open();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void
|
||||||
|
FileOutputStream::Open()
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Mode::CREATE:
|
case Mode::CREATE:
|
||||||
|
|
|
@ -133,6 +133,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void OpenCreate(bool visible);
|
void OpenCreate(bool visible);
|
||||||
void OpenAppend(bool create);
|
void OpenAppend(bool create);
|
||||||
|
void Open();
|
||||||
|
|
||||||
bool Close() noexcept {
|
bool Close() noexcept {
|
||||||
assert(IsDefined());
|
assert(IsDefined());
|
||||||
|
|
Loading…
Reference in New Issue