I am trying to get all files that are in a specific section of Google Drive (The Drive Section).
Those are the files I am looking for:
You can see a folder named Projet 3
and a file named Processus TP2 questions
. In the folder I only have one file.
But when I try to list all the files, I get thousands of files. If I search for them using the search bar on top of Google Drive, it finds them, but I have no idea where they are (maybe Gmail attachement?).
This is my search query:
FileList result = service.files().list()
.setQ("mimeType != 'application/vnd.google-apps.folder'
and trashed = false")
.setSpaces("drive")
.setFields("nextPageToken, files(id, name, parents)")
.setPageToken(pageToken)
.execute();
How can I list only the files I can see in my Drive Section/Folder on the web UI?
Thank you very much.