<commit_before>﻿using System;
using System.Configuration;
using System.IO;
using System.Linq;

namespace FileSystemSyncher.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var sourcePath = ConfigurationManager.AppSettings["SourcePath"];
                if (!string.IsNullOrWhiteSpace(sourcePath))
                {
                    sourcePath = Path.GetFullPath(sourcePath);
                    if (!Directory.Exists(sourcePath))
                    {
                        throw new ConfigurationErrorsException("The folder in the source path does not exist");
                    }
                }
                else
                {
                    throw new ConfigurationErrorsException("There was no source path set");
                }

                var destinationPath = ConfigurationManager.AppSettings["DestinationPath"];
                if (!string.IsNullOrWhiteSpace(destinationPath))
                {
                    destinationPath = Path.GetFullPath(destinationPath);
                    if (!Directory.Exists(destinationPath))
                    {
                        Directory.CreateDirectory(destinationPath);
                    }
                }
                else
                {
                    throw new ConfigurationErrorsException("There was no destination path set");
                }

                var sourceDirectory = new DirectoryInfo(sourcePath);
                foreach (var sourceFile in sourceDirectory.EnumerateFiles("*", SearchOption.AllDirectories))
                {
                    var destinationFilePath = sourceFile.FullName.Replace(sourcePath, destinationPath);
                    var destinationFile = new FileInfo(destinationFilePath);

                    if (!destinationFile.Exists || sourceFile.Length != destinationFile.Length ||
                        sourceFile.LastWriteTime != destinationFile.LastWriteTime)
                    {
                        Directory.CreateDirectory(destinationFile.DirectoryName);
                        File.Copy(sourceFile.FullName, destinationFilePath, true);
                    }
                }
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e);
            }
        }
    }
}<commit_msg>Updated the Program.cs file according with StyleCop rules<commit_after>﻿namespace FileSystemSyncher.Console
{
    using System;
    using System.Configuration;
    using System.IO;

    public static class Program
    {
        public static void Main()
        {
            try
            {
                string sourcePath = ConfigurationManager.AppSettings["SourcePath"];
                if (!string.IsNullOrWhiteSpace(sourcePath))
                {
                    sourcePath = Path.GetFullPath(sourcePath);
                    if (!Directory.Exists(sourcePath))
                    {
                        throw new ConfigurationErrorsException("The folder in the source path does not exist");
                    }
                }
                else
                {
                    throw new ConfigurationErrorsException("There was no source path set");
                }

                string destinationPath = ConfigurationManager.AppSettings["DestinationPath"];
                if (!string.IsNullOrWhiteSpace(destinationPath))
                {
                    destinationPath = Path.GetFullPath(destinationPath);
                    if (!Directory.Exists(destinationPath))
                    {
                        Directory.CreateDirectory(destinationPath);
                    }
                }
                else
                {
                    throw new ConfigurationErrorsException("There was no destination path set");
                }

                DirectoryInfo sourceDirectory = new DirectoryInfo(sourcePath);
                foreach (FileInfo sourceFile in sourceDirectory.EnumerateFiles("*", SearchOption.AllDirectories))
                {
                    string destinationFilePath = sourceFile.FullName.Replace(sourcePath, destinationPath);
                    FileInfo destinationFile = new FileInfo(destinationFilePath);

                    if (!destinationFile.Exists || sourceFile.Length != destinationFile.Length ||
                        sourceFile.LastWriteTime != destinationFile.LastWriteTime)
                    {
                        if (destinationFile.DirectoryName != null)
                        {
                            Directory.CreateDirectory(destinationFile.DirectoryName);
                            File.Copy(sourceFile.FullName, destinationFilePath, true);
                            Console.WriteLine(destinationFilePath);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.06913827655310621, 'fraction_numerical': 0.0, 'mean_word_length': 1.3431924882629107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4819237', 'n_tokens_mistral': 1044, 'n_tokens_neox': 954, 'n_words': 205}