Exemplo n.º 1
0
        private static int ExecuteMerge(MergeOptions options)
        {
            if (!options.Validate())
            {
                return(1);
            }

            var merger = new FileMerger(options);
            var timer  = Stopwatch.StartNew();

            var partitionCount = Directory.GetFiles(options.Folder, options.FileMask).Length;

            Console.WriteLine($"Merge {partitionCount} partition started...");

            merger.Merge();

            Console.WriteLine($"Partitions merge executed at {timer.Elapsed}");
            return(0);
        }