38 readBytes(
const std::filesystem::path &filePath)
const = 0;
48 readLines(
const std::filesystem::path &filePath)
const = 0;
58 virtual bool exists(
const std::filesystem::path &filePath)
const = 0;
68 getSize(
const std::filesystem::path &filePath)
const = 0;
Interface for reading file content.
Definition IFileReader.hpp:17
virtual Result< std::vector< uint8_t >, FileError > readBytes(const std::filesystem::path &filePath) const =0
Read the entire content of a file as a vector of bytes.
virtual bool exists(const std::filesystem::path &filePath) const =0
Check if a file exists.
virtual Result< std::uintmax_t, FileError > getSize(const std::filesystem::path &filePath) const =0
Get the Size object.
virtual Result< std::vector< std::string >, FileError > readLines(const std::filesystem::path &filePath) const =0
Read the content of a file as a vector of lines.
virtual Result< std::string, FileError > read(const std::filesystem::path &filePath) const =0
Read the entire content of a file as a string.
virtual ~IFileReader()=default
Definition UtilsError.hpp:93
Definition DirectoryManager.cpp:5
Definition UtilsError.hpp:35