getAllFilesByFormat method
Retrieves files by specific formats/extensions.
formats
- List of file extensions to search for (e.g., 'apk', 'dart', 'exe'
)
Returns a list of absolute file paths.
Implementation
@override
Future<List<String>> getAllFilesByFormat(List<String> formats) async {
try {
final result = await methodChannel.invokeMethod<List<dynamic>>(
'getAllFilesByFormat',
{'formats': formats},
);
if (result != null) {
return result.cast<String>();
}
return [];
} catch (e) {
// Log error and return empty list
// Error in getAllFilesByFormat
return [];
}
}