We are having issues where sometimes a file that a user can access is not returned when the user issues a files.list
. This can happen in many ways. For example, new members of a Google group will not see previously shared files, as described in this question. Moreover, acording to Google documentation there are other limits on sharing which can prevent shared files from appearing in the "Shared with me" view. Finally, a user can issue a files.delete
on a file she doesn't own, and the file will disappear from files.list
but will still exist.
What can a user do via the SDK alone to cause a file which she can access via files.get
to appear in the list of files retrieved via files.list
? We are using a service account which impersonates users; the user never authenticates to Google via a browser. A link in an email that the user needs to click won't work for us, unfortunately. Accessing the file via the Google Drive UI has the desired effect, but the analogous files.get
call does not.
The Google Calendar API explicitly exposes a CalendarList
interface where a user can issue an insert
to add an existing calendar to her list. The Google Drive SDK seems like a hybrid Files
/FilesList
interface with some of the functionality missing (nothing like FilesList.insert
) and some of the functionality mixed together (issuing a delete
as a non-owner acts like FilesList.delete
but issuing it as the owner acts like Files.delete
).
If we can't manage the user's files list programmatically then it is not useful for our service. We could ignore the files.list
call entirely and just start recursively performing children.list
queries on all shared folders, but this is incredibly expensive (unless someone knows how to issue a single query which returns all the Files
resources in a folder and not just the IDs of those resources).
Any help would be appreciated. We've been trying this many different ways and have been frustrated at every turn. Thanks!