Method IFilePath.RemoveMultiExtension
IFilePath.RemoveMultiExtension(string, PathOptions)
Removes the specified multi-extension, which has one or more parts (e.g. ".gz" or ".tar.gz"), from the end of the file name. Case is
ignored on every platform.
Declaration
IFilePath IFilePath.RemoveMultiExtension(string extension, PathOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | extension | The multi-extension to remove, shaped as described for HasMultiExtension(string). An empty extension leaves the path unchanged. |
| 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
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | The extension isn't shaped as described for HasMultiExtension(string) or has a character that
names can't have in the path format, the file name doesn't end with it, it is the whole file name, or the remaining file name is invalid for
|