Ejemplo n.º 1
0
        public HttpResponseMessage Status(string fileName)
        {
            fileName = FileHeader.Canonize(fileName);

            var report = Synchronizations.GetSynchronizationReport(fileName);

            return(GetMessageWithObject(report)
                   .WithNoCache());
        }
Ejemplo n.º 2
0
        private FileStatus CheckSynchronizedFileStatus(string filename, Etag etag)
        {
            var report = Synchronizations.GetSynchronizationReport(filename);

            if (report == null || report.FileETag != etag)
            {
                return(FileStatus.Unknown);
            }

            return(report.Exception == null ? FileStatus.Safe : FileStatus.Broken);
        }