From 7024acac06885f9d9e24125afef04231aebdd113 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 28 Jul 2022 22:34:24 -0300 Subject: feat: add override helper functions These help us keep track of relevant metadata information about overrides, so that we know what they are when we update a pack. Signed-off-by: flow --- launcher/modplatform/helpers/OverrideUtils.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 launcher/modplatform/helpers/OverrideUtils.h (limited to 'launcher/modplatform/helpers/OverrideUtils.h') diff --git a/launcher/modplatform/helpers/OverrideUtils.h b/launcher/modplatform/helpers/OverrideUtils.h new file mode 100644 index 00000000..73f059d6 --- /dev/null +++ b/launcher/modplatform/helpers/OverrideUtils.h @@ -0,0 +1,20 @@ +#pragma once + +#include + +namespace Override { + +/** This creates a file in `parent_folder` that holds information about which + * overrides are in `override_path`. + * + * If there's already an existing such file, it will be ovewritten. + */ +void createOverrides(QString name, QString parent_folder, QString override_path); + +/** This reads an existing overrides archive, returning a list of overrides. + * + * If there's no such file in `parent_folder`, it will return an empty list. + */ +QStringList readOverrides(QString name, QString parent_folder); + +} // namespace Override -- cgit