Files
kopia/fs/virtualfs
ashmrtn 5c031b17fa feat(snapshots): Allow uploader to find cached StreamingFiles (#2317)
* Allow setting mod time on StreamingFiles

Only set during struct creation. Default the old constructor to using
the current time as the mod time.

* Change how mod time is handled for StreamingFiles

Don't set StreamingFile mod time in the uploader, instead use the value
in the file's metadata. Also allows StreamingFiles to be recognized as
cached files (previously uploaded). StreamingFiles don't know their file
size until they've been completely uploaded so leaving that out makes
them eligible for being marked as "cached".

This commit combined with the previous commit slightly changes how
timestamps on StreamingFiles are handled. It will result in them having
slightly earlier timestamps because they are now set on struct creation
instead of when the file was uploaded.

As timestamps are fairly fine-grained and the default is to use the
current time as the mod time it seems unlikely this patch will result in
incorrectly thinking a StreamingFile is cached even though it has
changed size.

* Uploader test for StreamingFile caching
2022-08-16 22:00:52 -07:00
..