Detecting File Renames Drive API

I'm using a combination of the Changes feed and changes.list to get push notifications of any file changes on a users Drive, then the details of that change.

I can get details like the filename, if it was trashed or deleted etc. But I'm having difficulty determining a rename. I just get a notification that the file was updated. The 'title' is the new title, but without storing a full list of all the file names and ID's the last time I checked, is there a way to determine what file was renamed (renamed to/from)? Storing a list of file ID's locally and comparing every time there's a change isn't very efficient...

Am I missing a way to get more insightful details on what the exact change was that happened?


No you aren't missing anything.

The assumption is that you will simply grab all of the new meta data and use it to update whatever local record or view you want it for.

Also be aware that multiple changes are coalesced. So there may have been many changes over a period of time, but you will only see the change item for the most recent.

There is an implication in your question that you are identifying files by name. Always remember that files are identified by ID, and title is simply a transient attribute with no more significance than (say) the starred flag.

链接地址: http://www.djcxy.com/p/66436.html

上一篇: Google云端硬盘不会持续PUT更改

下一篇: 检测文件重命名驱动器API