public FakeFile CreateFile(string path, IDiskDriver driver) { var id = FileIdentifier.FromPath(path); if (_files.TryGetValue(id, out var result)) { return(result); } result = FileFactoryMethod(path, driver); _files.Add(id, result); return(result); }
public static FileIdentifier CombineFileId(DirectoryIdentifier id, string path) { var newPath = Path.Combine(id.FullName, path); return(FileIdentifier.FromPath(newPath)); }
public static FileIdentifier ConvertToFileId(DirectoryIdentifier id) { var path = id.FullName; return(FileIdentifier.FromPath(path)); }