I get a FileList with:
String q = "title contains '"+query+"' and trashed = false"; FileList list = drive.files().list().setQ(q).execute();
I want to find the path to each corresponding file in a FileList.
I understand that the same file can be displayed in several folders.
From what I found, the only way to create a file path is to re-call:
drive.files().get(id).execute()
and then select the identifier from this list of file files, raise the tree to reach the root.
While navigating the tree, I could just pick the first parent or make a “BFS” until I find the root.
Is this really the only way to find the path to the file, or am I missing the API part?
If this is the only way, can folders with multiple parents also make loops possible?
(/ a / b / c => / a / b / c / b / c / b / c ... if b has parents a and c)?
Brad tofel
source share