Method IsValidMultiExtension
IsValidMultiExtension(ReadOnlySpan<char>, PathOptions)
Determines whether the given file extension is a valid multi-extension for this path format. A multi-extension has one or more parts (e.g.
".gz" or ".tar.gz").
Declaration
public bool IsValidMultiExtension(ReadOnlySpan<char> extension, PathOptions options = PathOptions.NoUnfriendlyNames)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | extension | The extension to check. |
| PathOptions | options | The options each part of the extension is checked with. |
Returns
| Type | Description |
|---|---|
| bool |
Remarks
The empty extension is valid for all path formats.
If non-empty, the extension is a lone . or one or more parts, each a . followed by at least one character other than a .. Each
part is checked exactly as IsValidExtension(ReadOnlySpan<char>, PathOptions) checks a single extension with options.
HasMultiExtension(string), GetMultiExtension(params ReadOnlySpan<string>), RemoveMultiExtension(string, PathOptions) and AddMultiExtension(string?, PathOptions) take an extension that is valid with None.