fileExists method
Check if a file exists
Implementation
Future<bool> fileExists(String fileId) async {
try {
await retrieveFile(fileId);
return true;
} catch (e) {
if (e is ResponseFormatError && e.message.contains('404')) {
return false;
}
rethrow;
}
}