allows method

bool allows(
  1. FileAction action,
  2. String value, {
  3. bool subtree = false,
})

Implementation

bool allows(FileAction action, String value, {bool subtree = false}) {
  validateFilePath(value);
  return actions.contains(action) &&
      (!subtree || recursive) &&
      (value == path || recursive && _descendant(path, value)) &&
      !excludedPaths.any((excluded) => value == excluded || _descendant(excluded, value) || subtree && _descendant(value, excluded));
}