Segments Property
Gets the segments making up the path. These are slices of the FullPath and can be converted to either ReadOnlySpan<T> or string as needed. This does not include directory separator characters or the leading slash if there is one.
Namespace
Statiq.Common
Containing Type
NormalizedPath
Property Type
ReadOnlyMemory<char>[]

Syntax

public ReadOnlyMemory<char>[] Segments { get; }

Remarks

Be careful when comparing segments or sequences of segments. The default equality comparison behavior for ReadOnlyMemory<T> is to compare the reference equality of the underlying array, not the value equality of the items in the memory. If you want to compare two segments, SequenceEqual.

Value

Type Description
ReadOnlyMemory<char>[] The segments making up the path.