...
When a file is downloaded, specifying the file location is optional. If it isn't specified the file is placed in a default 'cache folder'. TODO: Organization of file cache (e.g. subfolders).
Cache Map Design
Cache Entry
There is a file for each Synapse FileHandle ID that has been downloaded or uploaded. The organization of the file cache is:
<cache root>/<file handle id>/<file name>
where
<cache root> is user configurable and defaults to ~/.synapseCache
<file handle id> is the file id part of the file handle
<file name> is the file name given by the file handle, or if there is a "collision" and ifcollision="keep.both" is selected, then the name is a modification created by the client to resolve the collision, e.g. file.txt may become file(1).txt.
Cache Map Design
Cache Entry
There is a file for each Synapse FileHandle ID that has been downloaded or uploaded. The file has the path:
<cache root> / <file handle id> / .cacheMap
The file contains the location and last-modified time stamp of each downloaded or uploaded file. The format is that of a JSON map whose keys are file paths and whose values are time stamps, e.g.
Code Block |
---|
{
"/path/to/file.txt": "2013-04-02 16:33:10"
} |
TODO: file naming convention and folder organization. TODO: file format (JSON?)
...