loadFromFile static method

IgnoreRules? loadFromFile(
  1. String filePath
)

Loads rules from a file, returns null if file doesn't exist.

Implementation

static IgnoreRules? loadFromFile(String filePath) {
  final file = File(filePath);
  if (!file.existsSync()) {
    return null;
  }
  return IgnoreRules.parse(file.readAsStringSync());
}