tgbot-cpp
Loading...
Searching...
No Matches
FileTools Namespace Reference

Functions

TGBOT_API std::string read (const std::string &filePath)
 
TGBOT_API void write (const std::string &content, const std::string &filePath)
 

Function Documentation

◆ read()

TGBOT_API std::string FileTools::read ( const std::string & filePath)

Reads whole file to string.

Parameters
filePathPath to a file
Exceptions
exceptionof type std::ifstream::failure if reading fails
Returns
string with file contents

◆ write()

TGBOT_API void FileTools::write ( const std::string & content,
const std::string & filePath )

Save file to disk.

Parameters
filePathPath to a file
Exceptions
exceptionof type std::ifstream::failure if writing fails