25 lines
834 B
C#
25 lines
834 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.IO.Compression;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FSI.BT.Tools.Global.Utilities
|
|
{
|
|
internal static class ExtractEmbeddedZip
|
|
{
|
|
internal static void Extract(string zipName, string destPath)
|
|
{
|
|
System.IO.Directory.CreateDirectory(destPath); // Erstellt alle fehlenden Verzeichnisse
|
|
using Stream _pluginZipResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(zipName);
|
|
using ZipArchive zip = new(_pluginZipResourceStream);
|
|
zip.ExtractToDirectory(destPath, true);
|
|
Vars.Log.Info("Externes Tool \"{0}\" wurde in das Verzeichnis \"{1}\" entpackt", zipName, destPath);
|
|
}
|
|
|
|
}
|
|
}
|