shouldSkipEntry method

bool shouldSkipEntry(
  1. FileSystemEntity entry
)

Determines if a file system entry should be skipped based on ignore patterns.

entry The file system entry to check. Returns true if the entry should be skipped, false otherwise.

Implementation

bool shouldSkipEntry(FileSystemEntity entry) {
  final fileName = entry.path.split(Platform.pathSeparator).last;

  return ignorePatterns.any((pattern) => fileName.contains(pattern)) ||
      fileName.startsWith('.');
}