How should I deal with copying and renaming in monitoring of files?

⚓ Rust    📅 2026-04-13    👤 surdeus    👁️ 5      

surdeus

Hey there,

I am working on a project where I am monitoring the files in which there are certain conditions like renaming, copying, updating, or nothing. It deals with path and content(hash Blake2s256).

  • For Nothing, the condition is path matched + content(hash) is same.
  • For Update, the condition is path matched + content(hash) is different.
  • For Copy, the condition is path not matched + content is not found.
  • For Rename, the condition is path not matched + __.

Now I am confused about copying and renaming. For copying, even if the content is not found, there is still a hash generated for an empty file and for the rename, I am confused that what should be put overall.

Thank you!

1 post - 1 participant

Read full topic

🏷️ Rust_feed