示例#1
0
        public void Resolve(string basePath)
        {
            var fileInfo   = new FileInfo(System.IO.Path.Combine(basePath, Path));
            var attributes = fileInfo.Attributes;

            if (attributes != (FileAttributes)(-1))
            {
                LastWriteTime = fileInfo.LastWriteTime;
                IsDirectory   = (attributes & FileAttributes.Directory) != 0;
            }
            else
            {
                ChangeType = FsChangeType.Remove;
            }
            NeedToResolve = false;
        }
示例#2
0
 private FsSenderChange(FsChangeType changeType, string path, bool isReady = true) : base(changeType, path)
 {
     // start stopwatch if not ready
     _readyStopwatch = SlimStopwatch.Create(!isReady);
 }
示例#3
0
 private FsSenderChange(FsChangeType changeType, string path, bool isReady = true) : base(changeType, path)
 {
     // start timer if not ready
     _readyTimer = Timer.Create(!isReady, ReadyTimeoutMs);
 }
示例#4
0
 public FsChange(FsChangeType changeType, string path)
 {
     ChangeType = changeType;
     Path       = path;
 }