<commit_before>﻿using Budford.Model;
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Budford.Properties;
using System.Security.AccessControl;
using System.Security.Principal;

namespace Budford.Control
{
    internal class FileManager
    {
        readonly Model.Model model;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="modelIn"></param>
        internal FileManager(Model.Model modelIn)
        {
            model = modelIn;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="ten80p"></param>
        internal static void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo target, bool ten80p = false, bool overrideit = false)
        {
            if (source.Exists)
            {
                if (!target.Exists)
                {
                    target.Create();
                }
                foreach (DirectoryInfo dir in source.GetDirectories())
                {
                    if (ten80p)
                    {
                        if (dir.Name.EndsWith("1080p"))
                        {
                            CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name), true);
                        }
                    }
                    else
                    {
                        CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name));
                    }<commit_msg>Fixed a bug copying over existing saves<commit_after>﻿using Budford.Model;
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using Budford.Properties;
using System.Security.AccessControl;
using System.Security.Principal;

namespace Budford.Control
{
    internal class FileManager
    {
        readonly Model.Model model;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="modelIn"></param>
        internal FileManager(Model.Model modelIn)
        {
            model = modelIn;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="ten80p"></param>
        internal static void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo target, bool ten80p = false, bool overrideit = false)
        {
            if (source.Exists)
            {
                if (!target.Exists)
                {
                    target.Create();
                }
                foreach (DirectoryInfo dir in source.GetDirectories())
                {
                    if (ten80p)
                    {
                        if (dir.Name.EndsWith("1080p"))
                        {
                            CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name), ten80p, overrideit);
                        }
                    }
                    else
                    {
                        CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name), ten80p, overrideit);
                    }
{'fraction_non_alphanumeric': 0.1071882951653944, 'fraction_numerical': 0.007633587786259542, 'mean_word_length': 1.2922740524781342, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '2212833', 'n_tokens_mistral': 798, 'n_tokens_neox': 741, 'n_words': 157}