Method TryParseRelative
TryParseRelative(ReadOnlySpan<char>, out IRelativeDirectoryPath?)
Attempts to parse a relative directory path using the NoUnfriendlyNames option and the current platform's format.
Declaration
public static bool TryParseRelative(ReadOnlySpan<char> path, out IRelativeDirectoryPath? result)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | path | A relative directory path. |
| IRelativeDirectoryPath | result | When this method returns, contains the parsed path if parsing succeeded, otherwise null. |
Returns
| Type | Description |
|---|---|
| bool |
TryParseRelative(ReadOnlySpan<char>, PathFormat, out IRelativeDirectoryPath?)
Attempts to parse a relative directory path using the specified format and the NoUnfriendlyNames option.
Declaration
public static bool TryParseRelative(ReadOnlySpan<char> path, PathFormat format, out IRelativeDirectoryPath? result)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | path | A relative directory path. |
| PathFormat | format | The path's format. |
| IRelativeDirectoryPath | result | When this method returns, contains the parsed path if parsing succeeded, otherwise null. |
Returns
| Type | Description |
|---|---|
| bool |
TryParseRelative(ReadOnlySpan<char>, PathOptions, out IRelativeDirectoryPath?)
Attempts to parse a relative directory path using the specified options and the current platform's format.
Declaration
public static bool TryParseRelative(ReadOnlySpan<char> path, PathOptions options, out IRelativeDirectoryPath? result)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | path | A relative directory path. |
| PathOptions | options | Specifies the path parsing options. |
| IRelativeDirectoryPath | result | When this method returns, contains the parsed path if parsing succeeded, otherwise null. |
Returns
| Type | Description |
|---|---|
| bool |
TryParseRelative(ReadOnlySpan<char>, PathFormat, PathOptions, out IRelativeDirectoryPath?)
Attempts to parse a relative directory path using the specified format and options.
Declaration
public static bool TryParseRelative(ReadOnlySpan<char> path, PathFormat format, PathOptions options, out IRelativeDirectoryPath? result)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | path | A relative directory path. |
| PathFormat | format | The path's format. |
| PathOptions | options | Specifies the path parsing options. |
| IRelativeDirectoryPath | result | When this method returns, contains the parsed path if parsing succeeded, otherwise null. |
Returns
| Type | Description |
|---|---|
| bool |