Method IFilePath.AddExtension
IFilePath.AddExtension(string?, PathOptions)
Adds a single extension to the file name, preserving any existing extensions before it.
Declaration
IFilePath IFilePath.AddExtension(string? extension, PathOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | extension | The new single extension that should be applied to the file. Must either be null/empty or start with a dot '.' character and
contain no additional dots (e.g. |
| PathOptions | options | The options to apply when parsing the new file name. The rest of the path is not reparsed. |
Returns
| Type | Description |
|---|---|
| IFilePath |
Implements
Remarks
The extension becomes the last extension of the new file name, so Extension returns it. A null or empty extension leaves the path unchanged.