Function LoadFile
Synopsis
#include <include/yaml-cpp/node/parse.h>
Node LoadFile(const std::string &filename)
Description
Loads the input file as a single YAML document.
- Exceptions
{
-
Mentioned in
- Tutorial / Introduction
Source
Lines 32-38 in src/parse.cpp. Line 46 in include/yaml-cpp/node/parse.h.
Node LoadFile(const std::string& filename) {
std::ifstream fin(filename);
if (!fin) {
throw BadFile(filename);
}
return Load(fin);
}