getDefaultScanRoots static method
Gets default scan roots for the current platform.
Implementation
static List<String> getDefaultScanRoots() {
final home = PathUtils.getHomeDirectory();
if (home.isEmpty) return [];
final roots = <String>[];
// All potential project directories (common + IDE-specific)
final potentialDirs = [
// Common project directories
'Developer',
'Projects',
'Documents',
// IDE-specific project directories
'StudioProjects', // Android Studio
'IdeaProjects', // IntelliJ IDEA
'workspace', // Eclipse
'Code', // VS Code (common workspace location)
'source', // Common alternative
'src', // Common alternative
'repos', // Common for repositories
'repositories', // Common for repositories
];
for (final dir in potentialDirs) {
final fullPath = path.join(home, dir);
if (PathUtils.isDirectory(fullPath)) {
roots.add(fullPath);
}
}
return roots;
}