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

@@ -122,15 +122,8 @@ namespace OpenRA.FileFormats
public static bool Exists(string filename)
{
foreach (var folder in mountedFolders)
{
var s = folder.GetContent(filename);
if (s != null)
{
s.Dispose();
return true;
}
}
if (folder.Exists(filename))
return true;
return false;
}