load method

DesiredState? load(
  1. String name
)

Loads name; null when absent. Throws SpecFormatException on an unparseable document — corrupt plans are surfaced, never ignored.

Implementation

DesiredState? load(String name) {
  final file = _file(name);
  if (!file.existsSync()) return null;
  return const SpecCodec().decode(file.readAsStringSync());
}