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