Google 驱动能力差异
Google Drive Capabilities Differences
我正在尝试使用 Google 驱动器 API 将文件移动到不同的位置。 Google驱动器中的某些文件是不可移动的,我在文件JSON的capabilities
部分看到了一些描述文件是否可以移动,复制等的变量。有两个变量我很困惑。一个是capabilities.canMoveItemOutOfDrive
,另一个是capabilities.canMoveItemWithinDrive
。我在我的驱动器中测试了一个文件并使其不可移动,但是 capabilities.canMoveItemWithinDrive
是 true
而 capabilities.canMoveItemOutOfDrive
是 false
。 Google 提供的解释似乎 capabilities.canMoveItemWithinDrive
应该是 false
。有人可以解释如何使用这两个变量吗?谢谢!
能力本质上是用户可以对 Drive 中的特定文件执行的一组操作。
关于你提到的两个能力:
canMoveItemOutOfDrive
Whether the current user can move this item outside of this drive by changing its parent.
Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
canMoveItemWithinDrive
Whether the current user can move this item within this drive.
Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
因此,如果capabilities.canMoveItemWithinDrive
为true
且capabilities.canMoveItemOutOfDrive
为false
,则表示您的文件只能在驱动器内移动。
但是,如果您查看 Files
资源文档 here,您会发现这两个功能都是 不可写。
参考
我正在尝试使用 Google 驱动器 API 将文件移动到不同的位置。 Google驱动器中的某些文件是不可移动的,我在文件JSON的capabilities
部分看到了一些描述文件是否可以移动,复制等的变量。有两个变量我很困惑。一个是capabilities.canMoveItemOutOfDrive
,另一个是capabilities.canMoveItemWithinDrive
。我在我的驱动器中测试了一个文件并使其不可移动,但是 capabilities.canMoveItemWithinDrive
是 true
而 capabilities.canMoveItemOutOfDrive
是 false
。 Google 提供的解释似乎 capabilities.canMoveItemWithinDrive
应该是 false
。有人可以解释如何使用这两个变量吗?谢谢!
能力本质上是用户可以对 Drive 中的特定文件执行的一组操作。
关于你提到的两个能力:
canMoveItemOutOfDrive
Whether the current user can move this item outside of this drive by changing its parent.
Note that a request to change the parent of the item may still fail depending on the new parent that is being added.
canMoveItemWithinDrive
Whether the current user can move this item within this drive.
Note that a request to change the parent of the item may still fail depending on the new parent that is being added and the parent that is being removed.
因此,如果capabilities.canMoveItemWithinDrive
为true
且capabilities.canMoveItemOutOfDrive
为false
,则表示您的文件只能在驱动器内移动。
但是,如果您查看 Files
资源文档 here,您会发现这两个功能都是 不可写。