+ return FileOverlayStatus.Unversioned;
+ }
+
+ public void ProcessExistingFiles(IEnumerable<FileInfo> paths)
+ {
+
+ var newFiles = (from file in paths
+ where !_overlayCache.ContainsKey(file.FullName)
+ select new
+ {
+ FilePath = file.FullName.ToLower(),
+ OverlayStatus = FileOverlayStatus.Unversioned,
+ FileStatus = FileStatus.Created,
+ Checksum = Signature.CalculateMD5(file)
+ });
+ var files = new ConcurrentBag<string>();
+ foreach (var state in newFiles)
+ {
+ _overlayCache[state.FilePath] = state.OverlayStatus;
+ _statusCache[state.FilePath] = state.FileStatus;
+ _checksums[state.FilePath] = state.Checksum;
+ files.Add(state.FilePath);
+ }
+
+ }
+
+ public void Stop()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetFileState(string path, FileStatus fileStatus, FileOverlayStatus overlayStatus)
+ {
+ if (String.IsNullOrWhiteSpace(path))
+ throw new ArgumentNullException("path", "path can't be empty");
+ SetFileStatus(path, fileStatus);
+ SetFileOverlayStatus(path, overlayStatus);
+ }
+
+ public void StoreInfo(string path, ObjectInfo objectInfo)
+ {
+ if (String.IsNullOrWhiteSpace(path))
+ throw new ArgumentNullException("path", "path can't be empty");
+ if (objectInfo == null)
+ throw new ArgumentNullException("objectInfo", "objectInfo can't be empty");
+
+ _statusCache[path] = FileStatus.Unchanged;
+ _overlayCache[path] = FileOverlayStatus.Normal;
+ _checksums[path] = objectInfo.Hash;
+
+
+ }
+
+ public T GetStatus<T>(string path, Func<FileState, T> getter, T defaultValue)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetStatus(string path, Action<FileState> setter)
+ {
+ throw new NotImplementedException();
+ }
+
+ ConcurrentDictionary<string, NetworkOperation> _networkState = new ConcurrentDictionary<string, NetworkOperation>();
+
+
+ public void SetNetworkState(string path, NetworkOperation operation)
+ {
+ _networkState[path.ToLower()] = operation;
+ //Removing may fail so we store the "None" value anyway
+ if (operation == NetworkOperation.None)
+ {
+ NetworkOperation oldOperation;
+ _networkState.TryRemove(path, out oldOperation);
+ }
+ }
+
+ public NetworkOperation GetNetworkState(string path)
+ {
+ NetworkOperation operation;
+ if (_networkState.TryGetValue(path, out operation))
+ return operation;
+ return NetworkOperation.None;
+ }
+
+ public void StartProcessing(CancellationToken token)
+ {
+
+ }
+
+ public string BlockHash { get; set; }
+
+ public int BlockSize { get; set; }
+ public void ChangeRoots(string oldPath, string newPath)
+ {
+ throw new NotImplementedException();
+ }
+
+ public FileState GetStateByFilePath(string path)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void ClearFolderStatus(string path)
+ {
+ throw new NotImplementedException();
+ }
+
+ public IEnumerable<FileState> GetChildren(FileState fileState)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnsureFileState(string path)
+ {
+ throw new NotImplementedException();