private SyncDirDiff GetDiffs() { var dstDirInfo = _dirHandler.GetSubDirInfo(_serverFilesRoot.FullName, "", "", _serverFilesRoot); var json = JsonConvert.SerializeObject(dstDirInfo); var syncDirInfo = JsonConvert.DeserializeObject <SyncDirDirectory>(json); var diffs = syncDirInfo.Diff(_clientFilesRoot); return(diffs); }
public SyncDirDirectory Get(string path) { path = Environment.ExpandEnvironmentVariables(path); if (!_pathValidator.ValidPath(path)) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.InternalServerError, "Invalid path. Path cannot be root of drive, or any of the common system and windows folders.")); } var dirUrl = ApiUrls.Sync.DirectoryTemplate(Url); var fileUrl = ApiUrls.Sync.FileTemplate(Url); var dir = _dirHandler.GetSubDirInfo(path, dirUrl, fileUrl, new DirectoryInfo(path)); return(dir); }