Example #1
0
        private void ExtractFileToPath(Ionic.Zip.ZipFile z, string OutputPath, string FileName)
        {
            z.UseZip64WhenSaving = Ionic.Zip.Zip64Option.Always;
            StatusFloater.Invoke(new System.Action(() => StatusFloater.lblSubStatus.Text = FileName));
            FileStream fs;

            if (!File.Exists(OutputPath + "\\" + FileName) && z.Count(ze => ze.FileName.Contains(FileName)) > 0)
            {
                fs = new FileStream(OutputPath + "\\" + FileName, FileMode.Create);
                Ionic.Zip.ZipEntry ze = z.Entries.Where(f => f.FileName.Contains(FileName)).First();
                ze.Extract(fs);
                fs.Flush(true);
                fs.Close();
            }
        }