|
@@ -0,0 +1,41 @@
|
|
|
+using System.IO.Enumeration;
|
|
|
+using FSE = (bool isDir, string path, long size, System.DateTimeOffset lastWrited);
|
|
|
+
|
|
|
+namespace FNZCM2.ProofOfConcept;
|
|
|
+
|
|
|
+internal static class PocScanFolder
|
|
|
+{
|
|
|
+ public static void RunPoc()
|
|
|
+ {
|
|
|
+ var fse = new FileSystemEnumerable<FSE>(
|
|
|
+ "library",
|
|
|
+ (ref FileSystemEntry p) => new(
|
|
|
+ p.IsDirectory,
|
|
|
+ p.ToFullPath(),
|
|
|
+ p.Length,
|
|
|
+ p.LastWriteTimeUtc
|
|
|
+ ),
|
|
|
+ new()
|
|
|
+ {
|
|
|
+ RecurseSubdirectories = true,
|
|
|
+ });
|
|
|
+
|
|
|
+ var lst = new List<FSE>();
|
|
|
+
|
|
|
+ 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
|
|
|
+ }
|
|
|
+}
|