MCPcopy Create free account
hub / github.com/covscript/covscript / fstream

Function fstream

sources/instance/type_ext.cpp:718–726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716 using namespace cs;
717
718 var fstream(const string &path, std::ios_base::openmode openmode)
719 {
720 if (openmode & std::ios_base::in)
721 return var::make<istream>(new std::ifstream(path, openmode));
722 else if (openmode & std::ios_base::out || openmode & std::ios_base::app)
723 return var::make<ostream>(new std::ofstream(path, openmode));
724 else
725 throw lang_error("Unsupported openmode.");
726 }
727
728 void setprecision(const numeric &pre)
729 {

Callers

nothing calls this directly

Calls 1

lang_errorClass · 0.85

Tested by

no test coverage detected