Set up stacked widget.

This commit is contained in:
jmsgrogan 2020-06-27 10:47:30 +01:00
parent 4e85edacc8
commit ee51f3ee09
51 changed files with 808 additions and 195 deletions

View file

@ -1,5 +1,6 @@
#include "File.h"
#include "FileLogger.h"
#include <streambuf>
File::File(std::filesystem::path path)
: mFullPath(path),
@ -62,6 +63,18 @@ FileFormat::Format File::InferFormat() const
return FileFormat::InferFormat(extension);
}
void File::WriteText(const std::string& text)
{
(*mOutHandle) << text;
}
std::string File::ReadText()
{
std::string str((std::istreambuf_iterator<char>(*mInHandle)),
std::istreambuf_iterator<char>());
return str;
}
bool File::PathExists() const
{
return std::filesystem::exists(mFullPath);