Click or drag to resize

KspPathsMakeAbsPathForGameData Method

Makes full absolute path from the provided relative path in the game's GameData folder.

Namespace:  KSPDev.FSUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static string MakeAbsPathForGameData(
	params string[] pathParts
)
Request Example View Source

Parameters

pathParts
Type: SystemString
Path parts for an absolute or relative path.

Return Value

Type: String
Absolute path. All relative casts (e.g. '..') will be resolved, and all directory separators will be translated to the platform format (e.g. '/' will become '\' on Windows).
Remarks
If joining of all the provided parts gives a full path then it's only normalized. In case of path is relative it's resolved against game's GameData folder.

Note that method doesn't care if the path exists.

See Also