I am trying to get a method that uses the DotNetZip library to extract a file to the current working directory, although I can’t seem to get it to do it, it wants a file path:
private void unzipfiles()
{
using (var zip = Ionic.Zip.ZipFile.Read("ccsetup307.zip"))
{
zip.ExtractAll("directory-name",
ExtractExistingFileAction.OverwriteSilently);
}
}
If you want to extract to the current directory, why don’t you use the
GetCurrentDirectorymethod and pass that in as the expected parameter like so:http://msdn.microsoft.com/en-us/library/system.io.directory.getcurrentdirectory.aspx
I know it isn’t implicit but it should work fine for you.