discover method
Implementation
@override
Future<List<CleanupTarget>> discover() async {
final targets = <CleanupTarget>[
CleanupTarget(
id: 'system:temp',
label: 'Temporary files',
path: platform.tempDirectory,
category: CleanupCategory.system,
contentsOnly: true,
),
];
final trash = platform.trashDirectory;
if (config.clean.trash && trash != null) {
targets.add(
CleanupTarget(
id: 'system:trash',
label: platform.isWindows ? 'Recycle bin' : 'Trash',
path: trash,
category: CleanupCategory.system,
contentsOnly: true,
),
);
}
return targets;
}