perf fix wrt calling OpenRead way too often.
This commit is contained in:
@@ -8,6 +8,7 @@ namespace OpenRa.FileFormats
|
||||
public interface IFolder
|
||||
{
|
||||
Stream GetContent(string filename);
|
||||
IEnumerable<uint> AllFileHashes();
|
||||
}
|
||||
|
||||
public class Package : IFolder
|
||||
@@ -131,6 +132,11 @@ namespace OpenRa.FileFormats
|
||||
{
|
||||
return GetContent(PackageEntry.HashFilename(filename));
|
||||
}
|
||||
|
||||
public IEnumerable<uint> AllFileHashes()
|
||||
{
|
||||
return index.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
||||
Reference in New Issue
Block a user