dear all
I\'m trying to find a list of documents by \"full path\". And after reading the API reference, it seems to be a complex task. Assume my path is something li
The biggest problem is that a path does not uniquely identify the file or folder! For example, in the web UI, you can make 2 folders with the same name as children of the same folder.
i.e. you can make a tree that looks like:
root
|-somefolder
|-somefolder
Unlike conventional file systems, a file could be under multiple folders on Drive. Folders are pretty much similar what labels are. Therefore, conventional paths dont always work within our abstraction. I'd suggest you to follow the logic below:
'root' in parents and title = 'path0' and mimeType = 'application/vnd.google-apps.folder'
and pick the first result.'<id of path0>' in parents and title = 'path1' and mimeType='application/vnd.google-apps.folder'
and pick the first result.Essentially check bottom up