isIgnoredFile method

bool isIgnoredFile(
  1. String path
)

Implementation

bool isIgnoredFile(String path) {
  var pathParts = pack_path.split(path);
  var fileName = pathParts.last;

  for (var p in ignoreFiles) {
    if (p is RegExp) {
      if (p.hasMatch(fileName)) {
        return true;
      }
    } else {
      if (p == fileName) {
        return true;
      }
    }
  }

  return false;
}