Click or drag to resize

KspPathsGetModsPath Method (Object)

Returns a relative game's path to the mod's root folder.

Namespace:  KSPDev.FSUtils
Assembly:  KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntax
C#
public static string GetModsPath(
	Object target
)
Request Example View Source

Parameters

target
Type: SystemObject
The target to resolve the assembly for.

Return Value

Type: String
An absolute path. There is always a trailing directory separator symbol.
Examples

Given the mod's assembly was loaded from GameData/ModFolder1/ModFolder2/Plugins/mod.dll, the returned path will be GameData/ModFolder1/ModFolder2/ because of Plugins folder name is considered to be a common name for the mod's binaries.

If the mod's DLL is located in the folder other than Plugins, then just the parent folder is returned. E.g. for GameData/ModFolder1/ModFolder2/MyDLLs/mod.dll, the result would be GameData/ModFolder1/ModFolder2/MyDLLs/.

See Also