fileQuery static method

String fileQuery(
  1. String name, {
  2. required String mimeType,
  3. String? parent,
})

Creates a query that searches for a particular file, name, and mimetype.

Implementation

static String fileQuery(
  final String name, {

  /// The mime type to search for. You can specify your own, but you're probably better off using the pre-written ones in the MimeType class.
  required final String mimeType,

  /// The ID of the parent folder
  final String? parent,
}) {
  final query = "mimeType='$mimeType' and name='$name' and trashed = false ${parent != null ? "and '$parent' in parents" : ""}";
  print('Prepared query: $query');
  return query;
}