shouldExclude method

bool shouldExclude(
  1. String path
)

Implementation

bool shouldExclude(String path) {
  for (final exclude in exclude) {
    if (path == exclude) {
      return true;
    }

    if (path.endsWith(exclude)) {
      return true;
    }

    if (Glob(exclude).matches(path)) {
      return true;
    }

    if (Glob('/$exclude').matches(path)) {
      return true;
    }
  }

  return false;
}