HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Reading Files

The FS_Reader class should be used to read files. It takes a file name in its constructor, and provides a C++ stream for reading the specified file. The difference between using FS_Reader and an ifstream directly is that FS_Reader supports an extensible architecture (see overview).

Most of the functions of this class are for internal use only. Only the functions listed below should be used in your code.


FS_Reader::FS_Reader(const char *filename)

  • This function is used to check if the file was successfully opened.


  • This function retrieves the C++ stream object which you can interact with in the normal ways. If this function returns nullptr, the file specified in the constructor could not be found.


  • Closes the stream. After calling this function, the getStream() function will always return nullptr.