I'm still learning the ins and outs of the Google Drive API. I'm trying to create a file browser for it that displays items in a hierarchical structure rather than displaying all files listed regardless of its parent.
The problem I came across was that there were some files with empty parents arrays. The idea is initially that it should show all files that exist in root, and only root, and then when a folder is clicked show its children.
However, the missing parent data has confused me.
Is this because those files have been shared with me and therefore do not have a parent reference in relation to me? If so, how can I identify such files? Using empty() on the returned parent data does not seem to recognise it as an empty array.