using System.IO.Enumeration; using FSE = (bool isDir, string path, long size, System.DateTimeOffset lastWrited); namespace FNZCM2.ProofOfConcept; internal static class PocFolderScanByFileSystemEnumerable { public static void RunPoc() { var fse = new FileSystemEnumerable( "library", (ref FileSystemEntry p) => new( p.IsDirectory, p.ToFullPath(), p.Length, p.LastWriteTimeUtc ), new() { RecurseSubdirectories = true, }); var lst = new List(); foreach (var entry in fse) { if (entry.isDir) continue; lst.Add(entry); int bp = 0; // by file type // - read tags // - make cache model } var allSize = lst.Sum(p => p.size); var fmt = allSize.ToString("N0"); //SUCCESS } }