Table of Contents

Interface IPlatformEnvironment

Namespace
RDCore.SDK.Platform
Assembly
RDCore.SDK.dll

Resolves platform paths from an explicit platform root rather than the process working directory.

public interface IPlatformEnvironment

Remarks

The platform root is the directory that holds rdcore.json and one subfolder per component (RDCore.CLI/, RDCore.LanguageServer/, …). A component's own base directory is <Root>/<Component>/, so the root is that directory's parent — independent of the working directory a process happens to be started with.

Properties

LogsDirectory

Absolute path of the platform logs directory, <Root>/Logs, created if missing.

string LogsDirectory { get; }

Property Value

string

ManifestPath

Absolute path of the platform manifest, <Root>/rdcore.json.

string ManifestPath { get; }

Property Value

string

Root

The platform root directory.

string Root { get; }

Property Value

string

UserDataDirectory

Absolute path of the folder of the platform's user: %USERAPPDATA%/RDCore, where what the user sets for themselves is kept - their settings (UserSettingsStore). Not created: nothing is kept there until something is.

string UserDataDirectory { get; }

Property Value

string

Remarks

It is not under Root: a platform that is deployed again replaces what is there, and what the user set is theirs to keep.

Methods

Resolve(string)

Resolves a root-relative path (either slash style) to an absolute path under Root.

string Resolve(string rootRelativePath)

Parameters

rootRelativePath string

A path relative to Root, using either / or </code>.

Returns

string