Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Action: The File object contains the file path to the local copy of the file and the FileHandle ID.  The associated 'last modified' time in the File Cache is compared to the current 'last modified time' for the file.  If the timestamps are the same no upload occurs.  Otherwise the file is uploaded (generating a new FileHandle ID) and the Cache Map entry is updated with the new FileHandleID and timestamp.  (Note:  The old entry is left in place, since some other in-memory File object may reference the same local file.)

 

Case: synGet is called for a File object which has not been downloaded.

...

Action: The File metadata are retrieved, including the FileHandle ID.   An entry is found in the Cache Map for the given FileHandle ID, but not for the given location.  If any currently downloaded file in the Cache Map for the FileHandle ID has an unchanged 'last modified' timestamp, it is copied to the new location, else the file is downloaded from Synapse to the new location.  Either way a new Cache Map entry is created for the new file.  (Note: We do NOT make the new File object point to the cached file, since unexpected behavior would result when multiple File objects modify the same on-disk file.)

 

Case: synGet is called for a File object which has been downloaded previously with the same target location.

...