public ModInfo(string modPath_) { modPath = modPath_; modName = Path.GetFileName(modPath); category = Path.GetFileName(Path.GetDirectoryName(modPath)); sevZip = Path.GetExtension(modPath).ToLower() == ".7z"; archiveFiles = ArchiveManager.GetArchiveFiles(this); if (File.Exists(modPath)) { date = File.GetCreationTime(modPath); } }
public static void ReCheckMods(IEnumerable <ModInfo> modInfos) { foreach (var mod in modInfos) { if (!mod.archiveExists) { continue; } mod.archiveFiles = ArchiveManager.GetArchiveFiles(mod); if (mod.archiveFiles != null) { foreach (var archFile in mod.archiveFiles) { if (!archFile.parent) { archFile.GetInstalled(); } } } } }