wabbajack/Compression.BSA/BSA/Reader/BSAStateObject.cs

36 lines
996 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Wabbajack.Common.Serialization.Json;
using File = Alphaleonis.Win32.Filesystem.File;
namespace Compression.BSA
{
[JsonName("BSAState")]
public class BSAStateObject : ArchiveStateObject
{
public string Magic { get; set; } = string.Empty;
public uint Version { get; set; }
public uint ArchiveFlags { get; set; }
public uint FileFlags { get; set; }
public BSAStateObject()
{
}
public BSAStateObject(BSAReader bsaReader)
{
Magic = bsaReader._magic;
Version = (uint)bsaReader.HeaderType;
ArchiveFlags = (uint)bsaReader.ArchiveFlags;
FileFlags = (uint)bsaReader.FileFlags;
}
public override async Task<IBSABuilder> MakeBuilder(long size)
{
return await BSABuilder.Create(this, size).ConfigureAwait(false);
}
}
}