hooks_ignore/ignore library

Implements an Ignore filter compatible with .gitignore.

An Ignore instance holds a set of .gitignore rules, and allows testing if a given path is ignored.

Example:

import 'package:ignore/ignore.dart';

void main() {
  final ignore = Ignore([
    '*.o',
  ]);

  print(ignore.ignores('main.o')); // true
  print(ignore.ignores('main.c')); // false
}

For a generic walk of a file-hierarchy with ignore files at all levels see Ignore.listFiles.

Classes

Ignore
A set of ignore rules representing a single ignore file.