-
Notifications
You must be signed in to change notification settings - Fork 0
How does it work?
FSDiff can know if a file in a file system has been modified thanks to its MD5 hash. When the user provides the reference file system, a hash of every file in this file system will be produced and stored along with the file path. Then the user provides the compared file system, and similarly a hash of every file in this file system will be produced and stored.
Then when it's the time to compare the two file system, FSDiff will scan every file path saved in the reference file system. For every file path in the reference file system, the program will look in the compared file system if it can find that file path. If the program finds it, it will then compare the hash from the reference file system to the one from the compared file system. If the hash is different then the file must have been modified.
There is no way FSDiff can absolutely be sure that a file has been created or deleted. But it can guess. When FSDiff scans every file path in the reference file system, it will look for the exact same path in the compared file system. If it doesn't find it, then the path have been deleted. But for all we know, the file could have been renamed or moved.
In the same fashion, when every file path of the reference file system has been scanned, there are file paths from the compared file system who "weren't called" for a comparison test, these file path have been created. But for all we know it could be a file that has been moved, or renamed.
FSDiff does not support detection of moved and renamed files yet, but it is in the roadmap.