watchfiles
watchfiles copied to clipboard
Support `compare_contents`
See here, might be good to give this option in a future release, I'm sure someone will want it.
/// Optional feature that will evaluate the contents of changed files to determine if
/// they have indeed changed using a fast hashing algorithm. This is especially important
/// for pseudo filesystems like those on Linux under /sys and /proc which are not obligated
/// to respect any other filesystem norms such as modification timestamps, file sizes, etc.
/// By enabling this feature, performance will be significantly impacted as all files will
/// need to be read and hashed at each `poll_interval`.
pub compare_contents: bool,
I want it!
I'm using watchfires as the basis for an SSG proof of concept (namely, re-imagining Sphinx.) I need incremental builds. So I need a way to compare the current tree to the last tree. I suspect though this is beyond the scope of just the hash.
PR welcome! Otherwise I'll get to it when I get to it.
Although this will only have an effect when in force polling mode, so many better to implement it yourself.
Agreed, it kind of felt like something beyond what you're looking to do.
I think beyond the remit of watchfiles.