Click or drag to resize

KspPathsGetModsDataFilePath Method

Returns a relative game's path to the file located in the data 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 GetModsDataFilePath(
	Object obj,
	string fileName,
	bool createMissingDirs = false,
	string subFolder = null
)
Request Example View Source

Parameters

obj
Type: SystemObject
The object instance to use to resolve the mod's assembly.
fileName
Type: SystemString
The data file name.
createMissingDirs (Optional)
Type: SystemBoolean
Instructs the method to create all the directories and subdirectories in the specified path, should they not already exist.
subFolder (Optional)
Type: SystemString
The optional sub-folder name to add to the path.

Return Value

Type: String
An absolute path.
See Also