public bool TryGetPack(string path, out Pack pack) { pack = null; if (!PackIdentifier.TryGet(path, out var id)) { return(false); } pack = _Packs.GetOrAdd(id, i => new Pack(this, DataDirectory, id)); return(true); }
public bool TryGetPack(string path, out Pack pack) { pack = null; if (!PackIdentifier.TryGet(path, out var id)) { return(false); } if (_Packs.TryGetValue(id, out pack)) { return(true); } pack = new Pack(this, DataDirectory, id); _Packs.Add(id, pack); return(true); }