public InfoData Get(Guid id) { if (Directory.Exists($"{Location}{Path.DirectorySeparatorChar}{id}")) { return(InfoData.LoadFromDirectory($"{Location}{Path.DirectorySeparatorChar}{id}{Path.DirectorySeparatorChar}data.json")); } else { return(null); } }
public IEnumerable <InfoData> All() { IEnumerable <string> directories = Directory.EnumerateDirectories(Location + Path.DirectorySeparatorChar); IList <InfoData> files = new List <InfoData>(); foreach (var d in directories) { files.Add(InfoData.LoadFromDirectory($"{d}{Path.DirectorySeparatorChar}data.json")); } return(files); }