Clear IArchive files properly

This commit is contained in:
KillzXGaming 2019-07-18 18:05:27 -04:00
parent e5b57de5e8
commit 38af392160
20 changed files with 61 additions and 97 deletions

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Load(System.IO.Stream stream)
{

View file

@ -23,11 +23,9 @@ namespace FirstPlugin
public bool CanReplaceFiles { get; set; } = true;
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool CanSave { get; set; }
public string[] Description { get; set; } = new string[] { "Bevel Engine Archive" };

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
private uint Unknown1;
private uint Version;

View file

@ -93,11 +93,9 @@ namespace FirstPlugin
}
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool CanAddFiles { get; set; } = false;
public bool CanRenameFiles { get; set; } = false;

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Load(System.IO.Stream stream)
{

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Load(System.IO.Stream stream)
{

View file

@ -48,11 +48,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
private uint Alignment;
public void Load(System.IO.Stream stream)

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Load(System.IO.Stream stream)
{

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public void Load(System.IO.Stream stream)
{

View file

@ -46,14 +46,11 @@ namespace FirstPlugin
public List<FileEntry> files = new List<FileEntry>();
public List<INode> nodes = new List<INode>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public IEnumerable<INode> Nodes => nodes;
public void ClearFiles() { files.Clear(); }
public string Name
{
get { return FileName; }

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public bool CanDeleteFiles { get; set; } = true;
public List<SarcEntry> files = new List<SarcEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public SarcData sarcData;
public string SarcHash;

View file

@ -45,10 +45,9 @@ namespace FirstPlugin
}
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files {
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
SDFTOC_Header Header;
public SDFTOC_Block2[] block2Array;

View file

@ -39,11 +39,9 @@ namespace FirstPlugin
}
public List<FileInfo> files = new List<FileInfo>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool CanAddFiles { get; set; }
public bool CanRenameFiles { get; set; }

View file

@ -46,11 +46,10 @@ namespace FirstPlugin
}
public List<FileInfo> files = new List<FileInfo>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool CanAddFiles { get; set; } = true;
public bool CanRenameFiles { get; set; } = true;

View file

@ -46,14 +46,11 @@ namespace FirstPlugin
public List<INode> nodes = new List<INode>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return null; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => null;
public IEnumerable<INode> Nodes => nodes;
public void ClearFiles() { nodes.Clear(); }
public string Name
{
get { return FileName; }

View file

@ -36,11 +36,9 @@ namespace FirstPlugin
public bool CanDeleteFiles { get; set; }
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool Identify(System.IO.Stream stream)
{

View file

@ -35,11 +35,9 @@ namespace FirstPlugin
public bool CanDeleteFiles { get; set; }
public List<NSP.FileEntry> files = new List<NSP.FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool Identify(System.IO.Stream stream)
{

View file

@ -35,10 +35,9 @@ namespace FirstPlugin
public bool CanDeleteFiles { get; set; }
public List<NSP.FileEntry> files = new List<NSP.FileEntry>();
public IEnumerable<ArchiveFileInfo> Files {
get { return Files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool Identify(System.IO.Stream stream)
{

View file

@ -45,11 +45,9 @@ namespace FirstPlugin
public bool CanDeleteFiles { get; set; }
public List<FileEntry> files = new List<FileEntry>();
public IEnumerable<ArchiveFileInfo> Files
{
get { return files; }
set { }
}
public IEnumerable<ArchiveFileInfo> Files => files;
public void ClearFiles() { files.Clear(); }
public bool Identify(System.IO.Stream stream)
{

View file

@ -27,8 +27,9 @@ namespace Toolbox.Library
bool CanReplaceFiles { get; }
bool CanDeleteFiles { get; }
IEnumerable<ArchiveFileInfo> Files { get; set; }
IEnumerable<ArchiveFileInfo> Files { get; }
void ClearFiles();
bool AddFile(ArchiveFileInfo archiveFileInfo);
bool DeleteFile(ArchiveFileInfo archiveFileInfo);
}
@ -296,7 +297,7 @@ namespace Toolbox.Library
progressBar.Task = "Repacking Files...";
progressBar.Refresh();
(ArchiveFile.Files as List<ArchiveFileInfo>)?.Clear();
ArchiveFile.ClearFiles();
for (int i = 0; i < ProccessedFiles.Count; i++)
{