cppassist  1.0.0.f4fab4f962ff
C++ sanctuary for small but powerful and frequently required, stand alone features.
Functions
cppassist::fs Namespace Reference

Functions

CPPASSIST_API bool readFile (const std::string &filePath, std::string &content)
 Read entire file into a string. More...
 
CPPASSIST_API std::string readFile (const std::string &filePath)
 Read entire file into a string. More...
 

Function Documentation

◆ readFile() [1/2]

CPPASSIST_API bool cppassist::fs::readFile ( const std::string &  filePath,
std::string &  content 
)

Read entire file into a string.

Parameters
[in]filePathPath to file
[out]contentString that receives the contents of the file
Returns
true if the file has been read successfully, else false

◆ readFile() [2/2]

CPPASSIST_API std::string cppassist::fs::readFile ( const std::string &  filePath)

Read entire file into a string.

Parameters
[in]filePathPath to file
Returns
File content as string, "" on error