Skip to main content

ModPaths

A static class in TavernLib, TavernLib.Backend.Mods.

Where the mod manager keeps things under the game folder, with a check that ids and file names can't escape their folder.

Methods​

MemberWhat it is
static string DisabledRecordPath(string gameDir, string modId)Mods/<id>/manifest.disabled.json.
static string LibrarySidecarPath(string gameDir, string filename)UserLibs/<file>.meta.json, the hash record for a library. Creates UserLibs.
static string ModDirPath(string gameDir, string modId)Mods/<id>. Throws if the id isn't a safe file name.
static string ModRecordPath(string gameDir, string modId)Mods/<id>/manifest.json.
static string ModsBase(string gameDir)The game's Mods folder.
static string SafeBasename(string name)Returns the name if it's a plain file name. Throws ModManagerException for separators, colons, a trailing dot or space, or ...
static string TargetDirPath(string gameDir, string modId, string target)Mods/<id>/.<target>, where a build is installed. Dot-prefixed, so MelonLoader skips it until MelonModFolders adds it.
static string UserLibsDir(string gameDir)The game's UserLibs folder. Creates it if missing.