You have to use sharedWithMe
, when using the Querying for Files:
The "Shared with me" category includes files owned and shared by others users which have been either: directly shared with the current user, a group containing the current user, or have been accessed by the current user.
Here is sample snippet that search for files shared with the authorized user with "hello" in the name:
sharedWithMe and name contains 'hello'
For "Go into the last folder, give me all global information (date/owner/what inside/size of the folder/if he got folders in him). And after coming back in, "his father folder" and continue to give me the same information. BUT ! If the "father folder" has a second child, he gives me the second child information first."
This will depend on your implementation but you have to recursively get the children of a folder type file. As stated in this related SO post,"stop thinking about Drive as being a tree structure. It isn't. "Folders" are simply labels, eg. a file can have multiple parents."
After getting the desire fileID with your specific qualifications, get the details using file.get
or include the details you want to get in file.list
.
Hope this helps.