Method AddMultiExtension
AddMultiExtension(string?, PathOptions)
Adds a multi-extension, which has one or more parts (e.g. ".gz" or ".tar.gz"), to the file name, preserving any existing extensions
before it.
Declaration
IRelativeFilePath AddMultiExtension(string? extension, PathOptions options = PathOptions.NoUnfriendlyNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string | extension | The new multi-extension that should be applied to the file. Must either be null/empty or start with a dot '.' character, and every dot must be followed by a character other than a dot, except in an extension that is a lone dot. |
| PathOptions | options | The options to apply when parsing the new file name. The rest of the path is not reparsed. |
Returns
| Type | Description |
|---|---|
| IRelativeFilePath |
Remarks
The new file name ends with the extension, so HasMultiExtension(string) returns true for it. A null or empty extension leaves the path unchanged.