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

36 lines
996 B
C#
Raw Normal View History

2020-08-11 12:15:03 +00:00
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;
2020-08-11 12:15:03 +00:00
public uint Version { get; set; }
public uint ArchiveFlags { get; set; }
public uint FileFlags { get; set; }
public BSAStateObject()
{
2020-08-11 12:15:03 +00:00
}
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);
}
}
}