Class OSPath
Represents a platform-agnostic file system path. This record normalizes input paths based on the operating system, providing utility methods to handle file paths in a cross-platform manner.
Inherited Members
Namespace: PoeShared.IO
Assembly: PoeShared.dll
Syntax
[JsonConverter(typeof(OSPathConverter))]
public record OSPath : IComparable, IEquatable<OSPath>
Constructors
Name | Description |
---|---|
OSPath(OSPath) | |
OSPath(string) |
Fields
Name | Description |
---|---|
AllSeparators | |
Empty | |
UnixDirectorySeparator | |
WindowsDirectorySeparator |
Properties
Name | Description |
---|---|
AsUnixPath | Gets the Unix-style path representation. |
AsWindowsPath | Gets the Windows-style path representation. |
Depth | Gets the depth of the path, calculated as the number of directory levels in the path. |
Directory | Gets the directory name component of the path. |
EqualityContract | |
Exists | Gets a value indicating whether the file denoted by this path exists. |
FullName | Gets the platform-specific full path. |
Name | Gets the file name component of the path. |
Methods
Name | Description |
---|---|
Combine(OSPath) | |
Combine(string) | |
CompareTo(object) | |
Equals(OSPath) | |
Equals(object?) | |
Equals(string, string) | |
GetHashCode() | |
PrintMembers(StringBuilder) | |
ToString() | |
<Clone>$() |
Operators
Name | Description |
---|---|
operator ==(OSPath?, OSPath?) | |
implicit operator OSPath(string) | |
operator !=(OSPath?, OSPath?) |