fileExists method

Future<bool> fileExists(
  1. String fileId
)

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;
  }
}