Blacker.Scraper.DownloadFormats.FolderDownloadFormat.SaveDownloadedChapter C# (CSharp) Method

SaveDownloadedChapter() public method

public SaveDownloadedChapter ( IChapterRecord chapter, DirectoryInfo downloadedFiles, string outputFolder, string &path ) : void
chapter IChapterRecord
downloadedFiles System.IO.DirectoryInfo
outputFolder string
path string
return void
        public void SaveDownloadedChapter(IChapterRecord chapter, DirectoryInfo downloadedFiles, string outputFolder, out string path)
        {
            if (chapter == null)
                throw new ArgumentNullException("chapter");
            if (downloadedFiles == null)
                throw new ArgumentNullException("downloadedFiles");
            if (String.IsNullOrEmpty(outputFolder))
                throw new ArgumentException("Output path must not be null or empty.", "outputFolder");

            var outputDir = new DirectoryInfo(Path.Combine(outputFolder, GetNameForSave(chapter)));

            path = outputDir.FullName;

            DirectoryCopy(downloadedFiles.FullName, path, true);
        }