feat: add method to delete mod metadata

Also moves indexDir setting from LocalModUpdateTask -> ModFolderModel
This commit is contained in:
flow
2022-04-14 22:02:41 -03:00
committed by flow
parent 8e4438b375
commit e93b9560b5
5 changed files with 48 additions and 17 deletions

View File

@ -40,8 +40,11 @@ class Packwiz {
* */
static void updateModIndex(QDir& index_dir, Mod& mod);
/* Deletes the metadata for the mod with the given name. If the metadata doesn't exist, it does nothing. */
static void deleteModIndex(QDir& index_dir, QString& mod_name);
/* Gets the metadata for a mod with a particular name.
* If the mod doesn't have a metadata, it simply returns an empty Mod object.
* */
static auto getIndexForMod(QDir& index_dir, QString mod_name) -> Mod;
static auto getIndexForMod(QDir& index_dir, QString& mod_name) -> Mod;
};