Skip to content

Instantly share code, notes, and snippets.

@belchev
Created November 11, 2015 09:47
Show Gist options
  • Save belchev/ae3ca7c2f925352fcdc4 to your computer and use it in GitHub Desktop.
Save belchev/ae3ca7c2f925352fcdc4 to your computer and use it in GitHub Desktop.
C# Unzip
using (ZipArchive archive = new ZipArchive(model.File.InputStream, ZipArchiveMode.Read))
{
//archive.ExtractToDirectory(Statics.TemplatesPath);
foreach (ZipArchiveEntry entry in archive.Entries)
{
string fullPath = Path.Combine(Statics.TemplatesPath, entry.FullName);
if (string.IsNullOrEmpty(entry.Name))
{
Directory.CreateDirectory(fullPath);
}
else
{
entry.ExtractToFile(fullPath, false);
}
}
}
Copy link

ghost commented Nov 11, 2015

Focused dashboard,!Fine-grained permissions..?Repositoryne..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment