// ------------------ // Stubbing from file // ------------------ private JamInfo?StubJamInfoFromFile(FilePath jamDirectoryPath) { var jamInfoPath = FilesystemSearch.ForFilesIn(jamDirectoryPath) .WithExtensions(".jaminfo") .FindAll() .FirstOrDefault(); if (jamInfoPath == null) { return(null); } return(JamFilesReader.TryLoadJamInfo(jamInfoPath.Value)); }
public JamInfo?TryLoadJamInfo(FilePath jamFilePath) { var jamInfo = JamFilesReader.TryLoadJamInfo(jamFilePath); if (jamInfo == null) { return(null); } var jamDirectoryPath = jamFilePath.GetParentDirectoryPath() !.Value; var entriesPath = jamDirectoryPath.Append(jamInfo.EntriesSubpath); jamInfo.Entries = LoadEntriesFromStubs(entriesPath, jamInfo.EntriesStubs).ToList(); return(jamInfo); }