Nicholas DiPiazza
Nicholas DiPiazza

Reputation: 10595

Google Drive Java SDK API - How do shared documents get treated when calling the children() function?

Let's say you want to list all of a Google drive user's content.

You would naturally call drive.files().get("root").execute()

I noticed that this file both returns files you own and files you are shared.

My question is - what structure are these coming in and what order? Is it just going to be some random mix of shared and owned files?

Upvotes: 0

Views: 29

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116996

well I would have though that that would return an error as files.get requires a file id to be passed and root is a folder not a file.

On the chance that you meant files.list then its pretty much random the order it is returned. However you can supply the q parameter to search for just one or the other you can also supply orderBy to sort the return results. Check the documentation

Upvotes: 1

Related Questions