Struct GenericPath.Segment
A single path segment.
struct Segment
;
Constructors
Name | Description |
---|---|
this
(name, separator)
|
Constructs a new path segment including an optional trailing separator. |
Fields
Name | Type | Description |
---|---|---|
m_encodedName
|
string | |
m_separator
|
char |
Properties
Name | Type | Description |
---|---|---|
encodedName [get]
|
string | The encoded representation of the path segment name |
extension [get]
|
auto | The extension part of the file name. |
hasSeparator [get]
|
bool | Returns true iff the segment has a trailing path separator.
|
name [get]
|
auto | The (file/directory) name of the path segment. |
separator [get, set]
|
char | The trailing separator (e.g. '/' ) or '\0' .
|
withoutExtension [get]
|
auto | Returns the file base name, excluding the extension. |
Methods
Name | Description |
---|---|
fromTrustedEncodedString
(encoded_name, separator)
|
Constructs a path segment without performing validation. |
fromTrustedString
(name, separator)
|
Constructs a path segment without performing validation. |
opCast
()
|
Converts the segment to another path type. |
opEquals
(other)
|
Compares two path segment names |