tidy FileSystem.Exists
This commit is contained in:
@@ -151,13 +151,7 @@ namespace OpenRA.FileFormats
|
|||||||
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
|
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool Exists(string filename)
|
public static bool Exists(string filename) { return mountedFolders.Any(f => f.Exists(filename)); }
|
||||||
{
|
|
||||||
foreach (var folder in mountedFolders)
|
|
||||||
if (folder.Exists(filename))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();
|
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user