Unstatic GlobalFileSystem and rename it to FileSystem

Add a ModFiles field on ModData and move all access to the file system to go through that.
This commit is contained in:
Pavel Penev
2015-10-09 13:55:08 +03:00
parent 5684bcec1c
commit 1b88d24cfa
46 changed files with 154 additions and 172 deletions

View File

@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;
namespace OpenRA
{
@@ -230,12 +229,6 @@ namespace OpenRA
return ret;
}
public static List<MiniYamlNode> FromFileInPackage(string path)
{
using (var stream = GlobalFileSystem.Open(path))
return FromLines(stream.ReadAllLines(), path);
}
public static Dictionary<string, MiniYaml> DictFromFile(string path)
{
return FromFile(path).ToDictionary(x => x.Key, x => x.Value);