Gopal Biswas
Gopal Biswas

Reputation: 419

Google Drive API - Search all files inside a root folder and sub folders in C#

I want to search all files inside a root folder and its sub folders in Google Drive API using C#. Suppose there is a root folder "A" which contains 5 files and a sub folder named "B". The sub folder "B" contains 4 files only. Now I have to populate all the files inside the root folder(5 + 4 = 9 files). Currently I'm populating files like-

FilesResource.ListRequest list = service.Files.List();
 list.OrderBy = "createdDate";
                list.MaxResults = 1000;
if (search != null)
                {
                    list.Q = search;
                }
  FileList filesFeed = list.Execute();

If anyone has any idea please share.

Thanks.

Upvotes: 1

Views: 886

Answers (1)

Andrew Lai
Andrew Lai

Reputation: 145

I only have objective-C sample code for search all file and folder.

I use recursive way for search all file.

you can use file MIMEType for determine folder or file.

Upvotes: 1

Related Questions