getConfig static method

Future<GlacierConfig> getConfig({
  1. String path = "./glacier.yaml",
})

Implementation

static Future<GlacierConfig> getConfig({String path = "./glacier.yaml"}) async {
  if (!await doesConfigExist(path: path)) {
    throw Exception("Invalid config path");
  }

  final file = File(path);
  final content = await file.readAsString();

  return GlacierConfig.fromYaml(content);
}