You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is a static website with quite some assets. The upload mechanism compares file timestamps to check which files have been updated.
Currently assets are copied over to the destination and get a fresh timestamp with each build. Thus my upload mechanism always wants to upload the whole site, even if I have changed only some pages.
So the feature request is for src/cobalt_model/files.rs, where around line 281 fs::copy is used, to also set the timestamp for the target file.
Interessting, can you elaborate why you consider mtime unreliable?
Anyways, setting it would still copy the file content to destination and any upload mechanism could decide on how to check for differences. Having an intact mtime would simple add one option to check on.
My use case is a static website with quite some assets. The upload mechanism compares file timestamps to check which files have been updated.
Currently assets are copied over to the
destination
and get a fresh timestamp with each build. Thus my upload mechanism always wants to upload the whole site, even if I have changed only some pages.So the feature request is for
src/cobalt_model/files.rs
, where around line 281fs::copy
is used, to also set the timestamp for the target file.This crate could help: https://crates.io/crates/filetime, esp. the routine
filetime::set_file_mtime
.Here is some code which could be used as an example: https://github.com/mtkennerly/ludusavi/blob/e0d16ca4aa6aafad8caebd648c242ac32c2cdae4/src/path.rs#L334
The text was updated successfully, but these errors were encountered: