<commit_before>﻿using System;
using System.Net;
using System.Threading.Tasks;
using Splat;

namespace Squirrel
{
    public interface IFileDownloader
    {
        Task DownloadFile(string url, string targetFile, Action<int> progress);
        Task<byte[]> DownloadUrl(string url);
    }

    class FileDownloader : IFileDownloader, IEnableLogger
    {
        public async Task DownloadFile(string url, string targetFile, Action<int> progress)
        {
            using (var wc = Utility.CreateWebClient()) {
            var failedUrl = default(string);<commit_msg>Make FileDownloader class public so clients can specify an alternate WebClient.<commit_after>﻿using System;
using System.Net;
using System.Threading.Tasks;
using Splat;

namespace Squirrel
{
    public interface IFileDownloader
    {
        Task DownloadFile(string url, string targetFile, Action<int> progress);
        Task<byte[]> DownloadUrl(string url);
    }

    public class FileDownloader : IFileDownloader, IEnableLogger
    {
        public async Task DownloadFile(string url, string targetFile, Action<int> progress)
        {
            using (var wc = Utility.CreateWebClient()) {
            var failedUrl = default(string);
{'fraction_non_alphanumeric': 0.08188585607940446, 'fraction_numerical': 0.0, 'mean_word_length': 3.336917562724014, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '643130', 'n_tokens_mistral': 325, 'n_tokens_neox': 320, 'n_words': 96}