Skip to content
Welcome to the new CppUtils documentation!

Namespace: CppUtils::FileSystem::Binary

auto readByBlocks(const std::filesystem::path& filePath, auto&& function, std::size_t blockSize=4 '096);
std::expected<void, Error> write(const std::filesystem::path& filePath, const Type::TriviallyCopyable auto& buffer, bool isAppend=false);
std::expected<void, Error> append(const std::filesystem::path& filePath, const Type::TriviallyCopyable auto& buffer);
template <Type::TriviallyCopyable T>
std::expected<T, Error> read(const std::filesystem::path& filePath);
template <Type::TriviallyCopyable T>
std::expected<void, Error> writeVector(const std::filesystem::path& filePath, const std::vector<T>& vector, bool isAppend=false);
template <Type::TriviallyCopyable T>
std::expected<void, Error> appendVector(const std::filesystem::path& filePath, const std::vector<T>& vector);
template <Type::TriviallyCopyable T>
std::expected<std::vector<T>, Error> readVector(const std::filesystem::path& filePath);