Clean up some tests.

This commit is contained in:
James Grogan 2022-12-01 10:52:48 +00:00
parent b17ba8b3a7
commit c102ebb6da
64 changed files with 615 additions and 541 deletions

View file

@ -23,42 +23,38 @@ public:
File(std::filesystem::path fullPath);
std::string GetExtension() const;
~File();
FileFormat::Format InferFormat() const;
void close();
std::ifstream* GetInHandle() const;
std::string dumpBinary();
std::ofstream* GetOutHandle() const;
static std::string getBaseFilename(const Path& path);
void WriteText(const std::string& text);
std::string getExtension() const;
std::string ReadText();
std::ifstream* getInHandle() const;
std::ofstream* getOutHandle() const;
FileFormat::Format inferFormat() const;
std::string readText();
std::vector<std::string> readLines();
std::string read();
static std::string getBaseFilename(const Path& path);
bool pathExists() const;
bool PathExists() const;
void SetAccessMode(AccessMode mode);
void Open(bool asBinary = false);
void Close();
bool open(AccessMode mode);
std::optional<unsigned char> readNextByte();
std::string dumpBinary();
void writeText(const std::string& text);
private:
std::filesystem::path mFullPath;
std::unique_ptr<std::ifstream> mInHandle;
std::unique_ptr<std::ofstream> mOutHandle;
AccessMode mAccessMode;
};