Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::TextFileReader Class Reference

#include <textfilereader.h>

Public Member Functions

 TextFileReader (const std::filesystem::path &filePath)
 
std::string read (const std::filesystem::path &filePath)
 
std::string read ()
 
void setFilePath (const std::filesystem::path &filePath)
 
const std::filesystem::path & getFilePath () const
 

Detailed Description

Reader for text files.

Member Function Documentation

◆ read() [1/2]

std::string inviwo::TextFileReader::read ( )

Read a file and return the content as a string. Throws an exception if file could not be opened and prints an error message to the error log.

Returns
Content of file.

◆ read() [2/2]

std::string inviwo::TextFileReader::read ( const std::filesystem::path & filePath)

Read a file and return the content as a string. Throws an exception if file could not be opened and prints an error message to the error log.

Parameters
filePathPath of file.
Returns
Content of file.

The documentation for this class was generated from the following file: