diff --git a/OpenRa.FileFormats/FileSystem.cs b/OpenRa.FileFormats/FileSystem.cs index 686f699c4a..b0c98d83ba 100644 --- a/OpenRa.FileFormats/FileSystem.cs +++ b/OpenRa.FileFormats/FileSystem.cs @@ -73,5 +73,20 @@ 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) + { + var s = folder.GetContent(filename); + if (s != null) + { + s.Dispose(); + return true; + } + } + + return false; + } } }