private static void _InternalExtractAll(this ZipFile zipFile, string path, bool overrideExtractExistingProperty) { bool verbose = zipFile.StatusMessageTextWriter != null; bool header = verbose; zipFile.SetInExtractAll(true); try { zipFile.OnExtractAllStarted(path); int n = 0; foreach (ZipEntry e in zipFile.Entries) { if (header) { zipFile.StatusMessageTextWriter.WriteLine("\n{1,-22} {2,-8} {3,4} {4,-8} {0}", "Name", "Modified", "Size", "Ratio", "Packed"); zipFile.StatusMessageTextWriter.WriteLine(new System.String('-', 72)); header = false; } if (verbose) { zipFile.StatusMessageTextWriter.WriteLine("{1,-22} {2,-8} {3,4:F0}% {4,-8} {0}", e.FileName, e.LastModified.ToString("yyyy-MM-dd HH:mm:ss"), e.UncompressedSize, e.CompressionRatio, e.CompressedSize); if (!String.IsNullOrEmpty(e.Comment)) { zipFile.StatusMessageTextWriter.WriteLine(" Comment: {0}", e.Comment); } } e.Password = zipFile.Password; // this may be null zipFile.OnExtractEntry(n, true, e, path); if (overrideExtractExistingProperty) { e.ExtractExistingFile = zipFile.ExtractExistingFile; } e.Extract(path); n++; zipFile.OnExtractEntry(n, false, e, path); if (zipFile.IsExtractOperationCanceled()) { break; } } if (!zipFile.IsExtractOperationCanceled()) { zipFile.OnExtractAllCompleted(path); } } finally { zipFile.SetInExtractAll(false); } }