yamlDoc function

YamlMap yamlDoc(
  1. File file
)

Retrieve Yaml document with given path.

Implementation

YamlMap yamlDoc(File file) {
  final yamlFile = file;
  final contents = yamlFile.readAsStringSync();
  final doc = loadYaml(contents) as YamlMap;
  return doc;
}