Exemple #1
0
    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);
        }
    }
Exemple #2
0
    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();
                    }
                }
            }
        }
    }