Interface IFilePath
Represents an absolute or relative path to a file.
Inherited Members
Namespace: Singulink.IO
Assembly: Singulink.IO.FileSystem.dll
Syntax
[TypeConverter(typeof(FilePathConverter))]
[JsonConverter(typeof(FilePathJsonConverter))]
public interface IFilePath : IPath, IEquatable<IPath?>
Properties
| Name | Description |
|---|---|
| Extension | Gets the last extension of the file name including the leading dot, otherwise an empty string. |
| NameWithoutExtension | Gets the file name without the last extension. |
Methods
| Name | Description |
|---|---|
| AddExtension(string?, PathOptions) | Adds a single extension to the file name, preserving any existing extensions before it. |
| AddMultiExtension(string?, PathOptions) | Adds a multi-extension, which has one or more parts (e.g. |
| GetMultiExtension(params ReadOnlySpan<string>) | Gets the longest of the known multi-extensions, which have one or more parts (e.g. |
| HasExtension(string) | Determines whether the last extension of the file name is the specified single extension. Case is ignored on every platform. |
| HasMultiExtension(string) | Determines whether the file name ends with the specified multi-extension, which has one or more parts (e.g. |
| RemoveExtension(string, PathOptions) | Removes the specified single extension, which is the last extension of the file name. Case is ignored on every platform. |
| RemoveMultiExtension(string, PathOptions) | Removes the specified multi-extension, which has one or more parts (e.g. |
| WithExtension(string?, PathOptions) | Changes the last extension of the file name to a new single extension. |