mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-24 21:25:32 +00:00
Core - Add ResourcePackImporter.cs
This commit is contained in:
21
PckStudio.Core/Extensions/ZipArchiveEntryExtensions.cs
Normal file
21
PckStudio.Core/Extensions/ZipArchiveEntryExtensions.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Core.Extensions
|
||||
{
|
||||
internal static class ZipArchiveEntryExtensions
|
||||
{
|
||||
public static string ReadAllText(this ZipArchiveEntry entry)
|
||||
{
|
||||
if (entry == null)
|
||||
return string.Empty;
|
||||
using StreamReader reader = new StreamReader(entry.Open());
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user