listCachedRefs method
Lists all cached refs for a repository
Implementation
List<String> listCachedRefs(String repoPath) {
final repoCacheDir = getRepositoryCacheDir(repoPath);
if (!repoCacheDir.existsSync()) {
return [];
}
return repoCacheDir
.listSync()
.where((entity) => entity is File && entity.path.endsWith('_api.json'))
.map((file) => basename(file.path).replaceAll('_api.json', ''))
.toList();
}