Пример #1
0
        internal static IEnumerable <FileHistoryFileInfo> GetAllFiles(DirectoryInfo dir, DirectoryInfo rootDir)
        {
            var fhRootDir = new FileHistoryDirectory(dir, rootDir);

            return(fhRootDir.Files.OrderBy(f => f.BackupDateTime).Reverse().Concat(fhRootDir.Directories.SelectMany(d => GetAllFiles(d.Directory, rootDir).OrderBy(f => f.BackupDateTime).Reverse())));
        }
 public FileHistoryFileInfo(FileInfo file, FileHistoryDirectory directory)
 {
     Directory = directory;
     File      = file;
 }