- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface FileHasher
A function to convert a Path to a hash code used to check if the file content is changed. This is called by
DirectoryWatcher after checking that the path exists and is not a directory. Therefore this hasher can generally
assume that those two things are true.
By default, this hasher may throw an IOException, which will be treated as a `null` hash by the watcher, meaning the
associated event will be ignored. If you want to handle that exception you can catch/rethrow it.