Reputation: 3
I am working with google apis and now need to undrestand if my result(I know the filde is a folder), is a root folder in google drive hierarchy( i mean the first folder which we see at first page of google drive) by having folder id till i could lead action to other specefic function. Do you know how can I find root folder by folder id. I know how can i find folder id by parsing folders but have no idea about reverse acttion.
$("#folderName" + folderId).click(function(){
//debugger;
$("#previousFolder").fadeIn();
navigategoogleDFolder(folderId);
});
}
You can see how i get folderid. but inside of the func i need to learn if the folder is root or not like
if(fodlerid.isRoot == false)
{
func(fodlerid);
}
Upvotes: 0
Views: 75
Reputation: 8122
As stated in Work with Folders,
You can use the alias
root
to refer to the root folder anywhere a file ID is provided.
Upvotes: 0