private void ResolveConflict(string localFilename, string filename) { IpfsFile file = _Files.First(o => o.LocalFilename == localFilename); if (file.ComputeHash(filename) != file.Hash) { Dirty = true; //TODO: Complete } }
private void ResolveConflict(IpfsFile remoteFile) { IpfsFile file = _Files.First(o => o.LocalFilename == remoteFile.LocalFilename); if (file.Hash != remoteFile.Hash) { Dirty = true; //TODO: Complete } }
private async Task AddFileNotAlreadyExisting(string filename, object lockObject) { string hashFilename = await IpfsApiWrapper.AddAsync(filename); IpfsFile file = new IpfsFile { LocalFilename = filename, RemoteFilename = hashFilename }; file.ComputerAndStoreHash(filename); lock (lockObject) { Dirty = true; _Files.Add(file); } }