resolve method
Resolve the first existing path against packageRoot.
Implementation
Directory? resolve(Directory packageRoot) {
for (final path in paths) {
// Normalize the path to handle mixed separators (e.g., 'vendor/lib' on Windows)
final normalizedPath = p.normalize(path);
final candidate = Directory(p.join(packageRoot.path, normalizedPath));
if (candidate.existsSync()) return candidate;
}
return null;
}