问题
In the quickstart demo, a shortcut file is created in Google Drive. I figure that this shortcut file facilitates the transfer of messages somehow. Can someone explain where this shortcut file points to and it's purpose in Realtime collaboration flow?
回答1:
The shortcut file is the "file" object that shows up in the user's drive. It has a pointer to the realtime data model. It doesn't actually do much, its just the place where basic information like title, share settings, etc are saved.
You need some file object that can hold this information. If you have separate file content that you want to associate a realtime data model with, you can use that instead. Otherwise, you use a shortcut file.
See these pages for some more info on the choice: https://developers.google.com/drive/realtime/application#step_4_create_or_fetch_a_google_drive_file https://developers.google.com/drive/realtime/models-files
来源:https://stackoverflow.com/questions/17621932/google-realtime-api-what-is-the-role-of-a-shortcut-file-in-google-drive