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

@@ -30,5 +30,10 @@ namespace OpenRA.FileFormats
foreach( var filename in Directory.GetFiles( path, "*", SearchOption.TopDirectoryOnly ) )
yield return PackageEntry.HashFilename( filename );
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path,filename));
}
}
}