readFile#
Fully qualified name: omni::extras::readFile
Defined in omni/extras/FileSystemHelpers.h
- inline std::pair<bool, std::string> omni::extras::readFile(
- const char *path,
Reads file content into a string.
Warning
This function reads data in a binary fashion and stores it in a
std::string. As such, the string may contain non-printable characters or evenNULcharacters. No conversion of Windows line endings is performed.- Parameters:
path – The path to read
- Returns:
a
std::pair, where thefirstmember indicates success iftrueand thesecondmember is the contents; iffirstisfalsethensecondwill always be empty. If the file is valid but empty,firstwill betruebutsecondwill be empty.