locateRoots abstract method

List<ContextRoot> locateRoots({
  1. required List<String> includedPaths,
  2. List<String>? excludedPaths,
  3. String? optionsFile,
  4. String? packagesFile,
})

Return a list of the context roots that should be used to analyze the files that are included by the list of includedPaths and not excluded by the list of excludedPaths.

If an optionsFile is specified, then it is assumed to be the path to the analysis_options.yaml file that should be used in place of the ones that would be found by looking in the directories containing the context roots.

If a packagesFile is specified, then it is assumed to be the path to the .packages file that should be used in place of the one that would be found by looking in the directories containing the context roots.

Implementation

List<ContextRoot> locateRoots(
    {required List<String> includedPaths,
    List<String>? excludedPaths,
    String? optionsFile,
    String? packagesFile});