mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 10:06:11 +00:00
Removed ARCUtil class
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
using OMI.Workers.Archive;
|
||||
using System.IO;
|
||||
|
||||
namespace PckStudio.Classes.Utils.ARC
|
||||
{
|
||||
public static class ARCUtil
|
||||
{
|
||||
public static void Inject(Stream stream, (string filepath, byte[] data) entry)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
var archive = reader.FromStream(stream);
|
||||
archive.Add(entry.filepath, entry.data);
|
||||
var writer = new ARCFileWriter(archive);
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
writer.WriteToStream(stream);
|
||||
}
|
||||
|
||||
public static bool ContainsFile(Stream stream, string filepath)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
var archive = reader.FromStream(stream);
|
||||
return archive.ContainsKey(filepath);
|
||||
}
|
||||
|
||||
public static void Remove(Stream stream, string filepath)
|
||||
{
|
||||
var reader = new ARCFileReader();
|
||||
var archive = reader.FromStream(stream);
|
||||
archive.Remove(filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,6 @@ using OMI.Workers.Language;
|
||||
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Classes.FileTypes;
|
||||
using PckStudio.Classes.Utils.ARC;
|
||||
using PckStudio.Forms;
|
||||
using PckStudio.Forms.Utilities;
|
||||
using PckStudio.Forms.Editor;
|
||||
|
||||
@@ -215,7 +215,6 @@
|
||||
<Compile Include="Classes\Models\DefaultModels\Steve64x64Model.cs" />
|
||||
<Compile Include="Internals\ApplicationScope.cs" />
|
||||
<Compile Include="Internals\SkinBOX.cs" />
|
||||
<Compile Include="Classes\Utils\ARC\ARCUtil.cs" />
|
||||
<Compile Include="Extensions\ImageExtensions.cs" />
|
||||
<Compile Include="Internals\SkinANIM.cs" />
|
||||
<Compile Include="Classes\Models\DefaultModels\Steve64x32Model.cs" />
|
||||
@@ -781,6 +780,9 @@
|
||||
<Name>SharpMss32</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Classes\Utils\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
Reference in New Issue
Block a user