vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Struct GenericPath.Segment

A single path segment.

struct Segment ;

Constructors

NameDescription
this (name, separator) Constructs a new path segment including an optional trailing separator.

Fields

NameTypeDescription
m_encodedName string
m_separator char

Properties

NameTypeDescription
encodedName[get] stringThe encoded representation of the path segment name
extension[get] autoThe extension part of the file name.
hasSeparator[get] boolReturns true iff the segment has a trailing path separator.
name[get] autoThe (file/directory) name of the path segment.
separator[get, set] charThe trailing separator (e.g. '/') or '\0'.
withoutExtension[get] autoReturns the file base name, excluding the extension.

Methods

NameDescription
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
Authors

Sönke Ludwig

Copyright

© 2012-2021 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.