[fnd] Add open constructor to fnd::SimpleFile

This commit is contained in:
jakcron 2018-06-03 16:47:28 +08:00
parent 4c9d0e5f37
commit 97cdaf36ac
2 changed files with 7 additions and 0 deletions

View file

@ -20,6 +20,7 @@ namespace fnd
};
SimpleFile();
SimpleFile(const std::string& path, OpenMode mode);
~SimpleFile();
void open(const std::string& path, OpenMode mode);

View file

@ -14,6 +14,12 @@ SimpleFile::SimpleFile() :
{
}
SimpleFile::SimpleFile(const std::string& path, OpenMode mode) :
SimpleFile()
{
open(path, mode);
}
SimpleFile::~SimpleFile()
{
close();