Fast checking for file existance

This commit is contained in:
Paul Chote
2010-08-18 22:56:16 +12:00
parent 0c5fb4c6b0
commit 30ab5c33ea
4 changed files with 18 additions and 9 deletions

View File

@@ -36,5 +36,10 @@ namespace OpenRA.FileFormats
}
public IEnumerable<uint> AllFileHashes() { return hashes; }
public bool Exists(string filename)
{
return hashes.Contains(PackageEntry.HashFilename(filename));
}
}
}