Beispiel #1
0
        public void ConvertFilesInDirectoryToTargetSystem(TargetSystem targetSystem, string inputDirectory)
        {
            Console.WriteLine(
                $"[Reading all {targetSystem.GetDescription()}-compatible files from {inputDirectory} and its subfolders...]");

            var files = Directory.EnumerateFiles(inputDirectory, "*.*", SearchOption.AllDirectories)
                        .Where(filePath => FileTypeIsSupportedByTargetSystem(targetSystem, filePath));

            foreach (var filePath in files)
            {
                ConvertFileToTargetSystem(targetSystem, filePath);
            }

            WriteLogSeparator();
            Console.WriteLine($"Finished processing folder {inputDirectory}");
        }