WorkspaceScanner class
Scans workspace directories and detects folder natures.
Combines FolderScanner and NatureDetector into a simple API that returns typed results.
Example usage:
final scanner = WorkspaceScanner();
final results = await scanner.scan('/path/to/workspace');
// Get all git repositories
var gitRepos = results.byNature<GitFolder>();
// Get all Dart projects
var dartProjects = results.byNature<DartProjectFolder>();
// Get publishable packages
var publishable = results.byNature<DartProjectFolder>()
.where((p) => p.isPublishable);
Constructors
- WorkspaceScanner({FolderScanner? scanner, NatureDetector? detector, bool verbose = false})
Properties
Methods
-
findDartProjectPaths(
String root) → Future< List< String> > -
Find all Dart project paths under
root. -
findDartProjects(
String root) → Future< List< DartProjectFolder> > -
Find all Dart projects under
root. -
findGitRepoPaths(
String root) → List< String> - Find git repository paths (shallow workspace-aware search).
-
findGitRepoPathsDeep(
String root) → Future< List< String> > - Find git repository paths recursively (deep search).
-
findGitRepos(
String root) → Future< List< GitFolder> > -
Find all git repositories under
root. -
findPublishable(
String root) → Future< List< DartProjectFolder> > -
Find all publishable Dart packages under
root. -
findPublishablePaths(
String root) → Future< List< String> > -
Find all publishable Dart package paths under
root. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scan(
String? root, {bool recursive = true, List< String> ? recursionExclude}) → Future<ScanResults> - Scan a directory for projects and detect their natures.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited