private void AddFileEntries(BaseDirectoryEntry baseDirectoryEntry, string fullyQualifiedFileName) { if (!UniqueFiles.ContainsKey(fullyQualifiedFileName)) { var fileEntry = new FileEntry(baseDirectoryEntry.Number, fullyQualifiedFileName); FileInfoHandler info = fileEntry.Info; long length = info.Length; if (length > int.MaxValue || length == 0L || info.Name.StartsWith(".")) { return; } UniqueFiles.Add(fullyQualifiedFileName, fileEntry); var lengthList = FilesByLength.ContainsKey(length) ? FilesByLength[length] : null; if (lengthList == null) { lengthList = new List <FileEntry>(); FilesByLength.Add(length, lengthList); } FilesByLength[length].Add(fileEntry); } }
public FileEntry(int baseDirectoryKey, string fqfn, FileInfoHandler handler) { this.BaseDirectoryKey = baseDirectoryKey; this.FQFN = fqfn; this.Info = handler; }