ZipFile.extract methods obsolete?

Dec 15, 2009 at 2:55 PM

Warning 1 'Ionic.Zip.ZipFile.Extract(string)' is obsolete: 'Please use method ZipEntry.Extract()' 


Am I missing something here?

It seems the ZipEntry.Extract method is not as flexible

Im trying to unzip a file to a specific directory



Dec 15, 2009 at 5:00 PM

yes, obsolete. In what regard is ZipEntry.Extract() not as flexible?

ZipEntry.Extract(directory)  works, no?


Dec 15, 2009 at 5:34 PM

Here is a sample of what I am trying to do...Im trying to zip directory D:\ExtData into a zip file then at a later time unzip this file

to D:\Test directory

<font size="2" color="#008080"><font size="2" color="#008080">


</font></font><font size="2" color="#008080">



zip = new ZipFile();

<font size="2">




<font size="2">




Works Great.... But..Next?


//ZipFile unzip1 = ZipFile.Read("D:\\Data\\");


//ZipEntry unzip1 = new ZipEntry();



Dec 15, 2009 at 6:42 PM

After continued attempts I finally got it....

ZipFile zip = new Zipfile();



--- All good to this pint -----

-- To unzip later ----

ZipFile unzip1 = ZipFile.Read("D:\\Data\\");

foreach(ZipEntry test1 in unzip1)


---All Files & SubDirectory extracted as expected-----

Thanks for work on this...I am just getting started with this..I will be expanding my usage of this code...


Dec 15, 2009 at 6:58 PM

Great, glad you got it sorted!

I'm glad to help.