コード例 #1
0
        protected override void ProcessFile(FileInfo file, int level)
        {
            var s = this.RebasePath(file.FullName, "");
            var r = HashInfo.CheckAndCorrectHashPath(s);

            if (r == null)
            {
                return;             // not a hashfile
            }
            var count = Win32.GetFileLinkCount(file.FullName);

            if (r == "" && count > 1)
            {
                return;                        // valid hash file and count is > 1
            }
            if (count > 1)
            {
                Monitor.Root.MoveFile(file.FullName, Path.Combine(this.Folder, r), 0);    // hash file and used, but with invalid format, move to new format
            }
            else
            {
                Monitor.Root.DeleteFile(file);  // not in use => delete
            }
        }