[#ReadBinaryFile] = ReadBinaryFile :mrdocs: Read full contents of a file and return them in a std::string. == Synopsis Declared in `<util/readwritefile.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<bool, std::string> ReadBinaryFile( xref:fs/path.adoc[fs::path] const& filename, size_t maxsize = std::numeric_limits<size_t>::max()); ---- == Return Value A pair <status, string>. If an error occurred, status is false; otherwise status is true and the file contents are returned in the string. == Parameters [cols="1,4"] |=== | Name| Description | *filename* | Path of the file to read. | *maxsize* | Puts a maximum size limit on the file that is read. If the file is larger than this, truncated data (with len > maxsize) will be returned. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#