Google Drive SDK:关于文件的父母 [英] Google Drive SDK: About parents of a file
问题描述
我有一个关于文件父母的问题。当我使用$ file-> getParents()获取有关父项的信息时,我收到一个数组,其唯一元素是有关父项的信息。
I've a question about the parents of a file. When I'm retrieving information about the parent with $file->getParents(), I'm receiving an array with the only element being the information about the parent.
我的问题是:现在,我总是只有一位家长,但是一个文件可以得到更多的父母吗?如果是,在这种情况下?
My question is: for now, I've always only one parent but can a file get more parents? And if yes, in which case?
感谢您的回答。
Thanks you for your answer.
推荐答案
文件在逻辑上可以是多个集合的一部分,您可以将它们视为允许分层结构的标签。
当文件属于多个文件夹时,API在调用getParents()时将返回它们的列表。
A file can be logically part of multiple collections, you can consider them as labels that allow a hierarchy. When a file belongs to multiple folders, the API will return their list when calling getParents().
这篇关于Google Drive SDK:关于文件的父母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!