Configuration.load constructor
Loads configuration from path
.
If global
is true
, this restricts the configuration to rules that are
supported globally.
Throws an IOException if path
does not exist or cannot be read. Throws
a FormatException if the file contents are invalid.
Implementation
factory Configuration.load(String path, {bool global = false}) {
final content = File(path).readAsStringSync();
final sourceUrl = p.toUri(path);
return parse(content, global: global, sourceUrl: sourceUrl);
}