vibe.d beta banner
get vibe.d
0.8.3

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

Struct GenericPath

Provides a common interface to operate on paths of various kinds.

struct GenericPath(F) ;

Constructors

NameDescription
this Constructs a path from its string representation.
this Constructs a path from a single path segment.
this Constructs a path from an input range of Segments.

Fields

NameTypeDescription
m_path string

Properties

NameTypeDescription
absolute[get] boolTests if the path is absolute.
bySegment[get] GenericPath.PathRangeIterates over the path by Segment.
empty[get] boolTests if the path is represented by an empty string.
endsWithSlash[get, set] boolDetermines whether the path ends with a path separator (i.e. represents a folder specifically).
head[get] GenericPath.SegmentReturns the trailing segment of the path.

Methods

NameDescription
fromString Constructs a path from its string representation.
fromTrustedString Constructs a path from its string representation, skipping the validation.
hasParentPath Determines if the parentPath property is valid.
isSeparator Tests if a certain character is a path segment separator.
normalize Removes any redundant path segments and replaces all separators by the default one.
opBinary Concatenates two paths.
opCast Converts the path to a different path format.
opEquals Compares two path objects.
opOpAssign Appends a relative path to this path.
parentPath Returns a prefix of this path, where the last segment has been dropped.
startsWith Tests whether the given path is a prefix of this path.
toHash Computes a hash sum, enabling storage within associative arrays.
toString Returns the string representation of the path.

Inner structs

NameDescription
PathRange Represents a path as an forward range of Segments.
Segment A single path segment.

Aliases

NameDescription
Format
Authors

Sönke Ludwig

Copyright

© 2012-2017 RejectedSoftware e.K.

License

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