Skip to content

Instantly share code, notes, and snippets.

@wakaztahir
Last active May 8, 2021 09:04
Show Gist options
  • Save wakaztahir/3a6bc5c7a8904da707df1f05ff5b01d0 to your computer and use it in GitHub Desktop.
Save wakaztahir/3a6bc5c7a8904da707df1f05ff5b01d0 to your computer and use it in GitHub Desktop.
Sync Cheat Sheet

Sync Cheat Sheet

  • LocalFileEditTime = Time at which file was modified in local
  • CloudFileEditTime = Time at which file was modified in cloud
  • FileCloudId = Cloud ID of file

Download (if not permanently deleted)

  • Download & Insert if FileCloudId is not found in local database
  • Download & Update if LocalFileEditTime < CloudFileEditTime

Upload (in ascending order of LocalFileEditTime)

  • Upload & Insert -> FileCloudId == Null in local database
  • Upload & Update -> LocalFileEditTime > CloudFileEditTime

Delete

  • Local : delete if permanently deleted in cloud  
  • Cloud : If deleted date is older than one month & permanently deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment