MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / readFile

Function readFile

src/attributes.cpp:851–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849
850 template <typename Stream>
851 void readFile(const std::string& file, Stream& os) {
852 std::ifstream ifs(file.c_str());
853 if (ifs.fail())
854 throw Rcpp::file_io_error(file); // #nocov
855 os << ifs.rdbuf();
856 ifs.close();
857 }
858
859 template <typename Collection>
860 void readLines(std::istream& is, Collection* pLines) {

Callers 2

parseSourceDependenciesFunction · 0.85

Calls 1

file_io_errorClass · 0.85

Tested by

no test coverage detected