Similar to this question Google Drive API Files.List Query String in the sense that I would like to know all the syntax for the setQ method: FileList files = drive.files().list() .setQ(“trashed=true”) .setMaxResults(100) .execute();
In particular I would like to get the files (not folders) from the query.
To get folders this query works: request.Q = "mimeType='application/vnd.google-apps.folder' and trashed=false "
I have tried different combinations, like
request.Q = "not mimeType='application/vnd.google-apps.folder' and trashed=false "
request.Q = "mimeType!='application/vnd.google-apps.folder' and trashed=false "
etc
Some run but ignore the not, some just crash.
Is there a way to get a list of only files?
There are currently no negations in the Drive API query language, sorry! This is a great feature that we should be looking to add.