Unzip folder keeping folder structure

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 1474 Views - Last Post: 27 December 2012 - 08:13 PM Rate Topic: -----

#16 AVividLight  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 26-December 12

Re: Unzip folder keeping folder structure

Posted 27 December 2012 - 08:13 PM

--- -
Okay, I've read through some of the documentation, have decided to try to use the ZipFile.ExtractAll method. I thought that "This method will extract all entries in the ZipFile to the specified path." meant that it will unzip a file, and put the created folder/files at a specified path. That's not the case (although, I think it may be a bug), as it's still starting at the current working directory. I'll post my code bellow, if you want to look at it, and see if I've done something wrong.

using(ZipFile zip = ZipFile.Read("/Users/GibsonBethke/Desktop/UnityMusicPlayer.zip"))
			{

				UnityEngine.Debug.Log(zip.Count);

				zip.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
				zip.ExtractAll("/Users/GibsonBethke/Desktop/UnityMusicPlayer.app");
			}


The "UnityEngine.Debug.Log" part was just to check if it's actually able to find the zipped file; it is, and returns with the correct number of files.

Thanks for your time! - Gibson
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2