Unlock zip file after extracting files using ionic.zip and C# -


i tried use files inside zip unlocked ionic.zip in c#

i using

 string ziptounpack = filename;  extractfiletodirectory(filename,apppath); 

first time works fine, try second time , io exception saying file been used user. how can unlocked file current process?

i cannot seem find extractfiletodirectory in ionic.zip's reference documentation. did find function same name in stackoverflow question, "extract zip file programmatically dotnetzip library?". if implementation using, need call dispose on zipfile close underlying file streams.

public void extractfiletodirectory(string zipfilename, string outputdirectory) {      using (zipfile zip = zipfile.read(zipfilename))      {          directory.createdirectory(outputdirectory);          zip.extractall(outputdirectory,extractexistingfileaction.overwritesilently);      } } 

if not, share more details how extracting files.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -