Split IPackage into IReadOnlyPackage and IReadWritePackage.

This commit is contained in:
Paul Chote
2016-01-15 22:49:12 +00:00
parent 77b0bd6067
commit f8d0b97e8d
13 changed files with 40 additions and 52 deletions

View File

@@ -14,15 +14,19 @@ using System.IO;
namespace OpenRA.FileSystem
{
public interface IPackage : IDisposable
public interface IReadOnlyPackage : IDisposable
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> ClassicHashes();
IEnumerable<uint> CrcHashes();
IEnumerable<string> AllFileNames();
void Write(Dictionary<string, byte[]> contents);
int Priority { get; }
string Name { get; }
}
public interface IReadWritePackage : IReadOnlyPackage
{
void Write(Dictionary<string, byte[]> contents);
}
}