discoverDartFiles static method

List<String> discoverDartFiles(
  1. String directory, {
  2. List<String> excludeGlobs = const [],
  3. List<String> includeGlobs = const [],
})

Public wrapper around _findDartFiles for callers that need the project's discovered file list up front (e.g. the scan daemon's listFiles request, which the IDE baseline scan uses to build chunked batches before issuing per-chunk resolved scans).

Optional excludeGlobs / includeGlobs use the same matching as the CLI flags (relative to directory, or the path as listed).

Implementation

static List<String> discoverDartFiles(
  String directory, {
  List<String> excludeGlobs = const [],
  List<String> includeGlobs = const [],
}) => _findDartFiles(
  directory,
  excludeGlobs.map(_globToRegex).toList(),
  includeGlobs.map(_globToRegex).toList(),
);