installedVersionedIsccs static method
Returns the ISCC.exe of every version managed under versionsDir
(defaults to innoManagedVersionsDir) that is at least
minSupportedVersion, sorted by version in descending order (highest
first). Below-floor versions on disk are left untouched but ignored.
Implementation
static List<File> installedVersionedIsccs([String? versionsDir]) {
final dir = Directory(versionsDir ?? innoManagedVersionsDir);
if (!dir.existsSync()) return [];
final isccs = <File>[];
for (final entry in dir.listSync().whereType<Directory>()) {
final iscc = File(p.join(entry.path, 'ISCC.exe'));
if (!iscc.existsSync()) continue;
final version = p.basename(entry.path);
if (compareVersions(version, minSupportedVersion) < 0) continue;
isccs.add(iscc);
}
isccs.sort((a, b) {
final cmp = compareVersions(
p.basename(a.parent.path),
p.basename(b.parent.path),
);
return cmp == 0 ? 0 : -cmp;
});
return isccs;
}