tidy FileSystem.Exists

This commit is contained in:
Chris Forbes
2011-12-09 22:19:44 +13:00
parent 1e4f1a9f19
commit 87a420623b

View File

@@ -151,13 +151,7 @@ namespace OpenRA.FileFormats
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
}
public static bool Exists(string filename)
{
foreach (var folder in mountedFolders)
if (folder.Exists(filename))
return true;
return false;
}
public static bool Exists(string filename) { return mountedFolders.Any(f => f.Exists(filename)); }
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();