public Boolean ExtractZipFile(string zipFilePath, string pathToExtract)
{
try
{
var options = new ReadOptions { StatusMessageWriter = System.Console.Out };
using (ZipFile zip = ZipFile.Read(zipFilePath, options))
{
// This call to ExtractAll() assumes:
// - none of the entries are password-protected.
// - want to extract all entries to current working directory
// - none of the files in the zip already exist in the directory;
// if they do, the method will throw.
zip.ExtractAll(pathToExtract);
}
}
catch (Exception)
{
return false;
}
return true;
}