确定要跟踪的更改日志
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
用户和共享云端硬盘更改日志在更改和修订版本概览中定义。本指南详细介绍了各个变更日志条目,并提供了有关何时在用户变更日志或共享云端硬盘变更日志中跟踪变更的提示。
文件移至共享云端硬盘后更改条目
将文件移动到共享云端硬盘后,该共享云端硬盘的更改日志会继续记录相应文件的更改,而不是用户更改日志。然后,您应查询共享云端硬盘更改日志,以检测该项的新更改。
更改共享云端硬盘中各个条目的条目
如果向非成员授予对共享云端硬盘中个别文件的访问权限,则对这些文件所做的更改会在用户更改日志中跟踪,而不是在共享云端硬盘更改日志中跟踪。此行为与直接与用户共享的非共享云端硬盘内容相同。
更改了丢失的访问权限的条目
如果用户失去对文件的访问权限,更改日志条目会显示 deleted
。不过,仍有权访问该文件的其他用户仍然可以访问该文件。如果某个项目被所有用户删除,则会在所有用户更改日志中标记为 deleted
。
当文件在用户语料库之间移动时,即使用户仍保留对该文件的访问权限,该文件也可能会显示为 deleted
。如果您要查询多个语料库的更改日志,请在 Changes.list 中使用 includeCorpusRemovals
参数,以区分语料库移动和访问权限丢失。
如需了解不同语料库的定义,请参阅文件和文件夹概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-04。
[null,null,["最后更新时间 (UTC):2025-08-04。"],[],[],null,["# Identify which change log to track\n\nThe user and shared drive change logs are defined in the [Changes and revisions overview](/workspace/drive/api/guides/change-overview). This guide provides more information about individual change log entries and tips for when to track changes in either the user change log or the shared drive change log.\n\nChange entry after file moves to a shared drive\n-----------------------------------------------\n\nAfter a file is moved to a shared drive, that shared drive change log continues logging changes for that file, not the user change log. You should then query the shared drive change log to detect new changes to that item.\n\nChange entry for individual items in a shared drive\n---------------------------------------------------\n\nIf a non-member is granted file access to individual items in a shared drive,\nchanges to those items are tracked in the user change log, not the shared drive change log. This behavior is the same as non-shared drive items that are shared directly with users.\n\nChange entry for lost access permission\n---------------------------------------\n\nIf a user loses access permission to a file, the change log entry will say `deleted`.\nHowever, the file is still available to other users who still have permission to access the file. If the item is deleted for all users, it will get marked `deleted` in all user change logs.\n\nWhen a file moves between user corpora it may also appear `deleted` even though the user still retains access to the file. If you query change logs for multiple corpora, use the `includeCorpusRemovals` parameter in [Changes.list](/workspace/drive/api/reference/rest/v3/changes/list) to disambiguate corpus moves from loss of access.\nFor definitions of different corpora, see [Files and folders overview](/workspace/drive/api/guides/about-files)."]]