Class HomePath
Contains methods for resolving the home directory path.
Inheritance
System.Object
HomePath
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public static class HomePath
Methods
GetHomePath()
Resolves the current user's home directory path. Throws an exception if the path cannot be resolved.
Declaration
public static string GetHomePath()
Returns
| Type | Description |
|---|---|
| System.String | The home path. |
Resolve(String[])
Resolves a collection of path segments with a home directory path.
Declaration
public static string Resolve(params string[] pathSegments)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | pathSegments | The path segments. |
Returns
| Type | Description |
|---|---|
| System.String | A combined path which includes the resolved home directory path (if necessary). If home directory path cannot be resolved, returns null. |
Remarks
Provides support for Unix-like paths on Windows. If the first path segment starts with ~, this segment is prepended with the home directory path.
TryGetHomePath(out String)
Tries to resolve the current user's home directory path.
Declaration
public static bool TryGetHomePath(out string homePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | homePath | Output: resolved home path. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if home path was resolved; otherwise, false. |