Set up stacked widget.
This commit is contained in:
parent
4e85edacc8
commit
ee51f3ee09
51 changed files with 808 additions and 195 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue