Пример #1
0
        private static void DoSoundListCreate(FileSystemInfo source, FileInfo target)
        {
            Console.WriteLine($"Scanning '{source.FullName}' for .pcm files.");
            var sourceContainer = FilesContainer.From(source.FullName);
            var names           = sourceContainer.GetFiles().Where(a => a.EndsWith(".pcm", StringComparison.OrdinalIgnoreCase)).ToList();

            Console.WriteLine($"{names.Count} .pcm files found.");
            Console.WriteLine("Writing.");
            SoundListFile.WriteEntries(target.FullName, names);
            Console.WriteLine("Done.");
        }
Пример #2
0
        private static void DoSoundListList(FileInfo source)
        {
            var names = SoundListFile.ReadEntries(source.FullName).ToList();

            foreach (var name in names)
            {
                Console.WriteLine(name);
            }

            Console.WriteLine($"---\n{names.Count} name(s)");

            var extensions = names.GroupBy(a => Path.GetExtension(a));

            foreach (var item in extensions)
            {
                Console.WriteLine($"{item.Key}: {item.Count ()}");
            }
        }