//OnChange - Compare file hashes and persist if changed. public void ProcessChanged(Guid id, string filename) { //get paths var fFile = hashedFileFactory.Create(fileHelper.BuildPath(index.GetPath(id, PathType.Source), filename)); var bFile = hashedFileFactory.Create(fileHelper.BuildPath(index.GetPath(id, PathType.Backup), filename)); //compare files and copy over if changed var cmpr = fFile.CompareTo(bFile); if (fFile.CompareTo(bFile) != 0) { Console.WriteLine("Changed: " + filename); repos.Update(fFile.Path, bFile.Path); } }