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");
path = Path.Combine(outputFolder, GetNameForSave(chapter) + ".cbz");
var fileInfo = new FileInfo(path);
using (var zip = new ZipFile())
{
zip.AddDirectory(downloadedFiles.FullName, null);
zip.Save(fileInfo.FullName);
}
}