public static long Package(string folderPath, string packagePath)
{
if (!Directory.Exists(folderPath))
{
Logger.Write(folderPath + "NOT EXIST!!!!");
return 0;
}
var fileName = GetFolderName(folderPath);
using (ZipFile zip = new ZipFile())
{
zip.AddDirectory(folderPath);
zip.Comment = "This zip was created at " + System.DateTime.Now.ToString("G");
zip.Save(packagePath);
}
return new FileInfo(packagePath).Length / 1024;
}