findPackageDirectory method
Locates an existing package directory by package
and version
.
Returns the absolute path if found, or null
otherwise.
Implementation
String? findPackageDirectory(WindowsMetadataPackage package, String version) {
final packagePath = _packagePath(package, version);
final metadataPath = p.join(packagePath, package.assetName);
if (File(metadataPath).existsSync()) return packagePath;
return null;
}