tgbotxx  1.1.6.9
Telegram Bot C++ Library
FileUtils.hpp File Reference
#include <filesystem>
#include <fstream>
#include <functional>
#include <string>
#include <tgbotxx/Exception.hpp>
#include <vector>

Go to the source code of this file.

Namespaces

 tgbotxx
 
 tgbotxx::FileUtils
 Namespace contains useful File related utility functions.
 

Functions

static std::string tgbotxx::FileUtils::read (const fs::path &filename)
 Read entire file into an std::string. More...
 
static std::vector< std::string > tgbotxx::FileUtils::readLines (const fs::path &filename)
 Read entire file lines into std::vector<std::string> More...
 
static void tgbotxx::FileUtils::readChunks (const fs::path &filename, const std::size_t maxChunkSize, const std::function< void(std::vector< std::uint8_t > &&)> &callback)
 Read file chunk by chunk. More...
 
static void tgbotxx::FileUtils::write (const fs::path &filename, const std::string &buffer)
 Write buffer string to a new file. More...