GitPathStyle class final Testing

Path spelling of a platform: Windows or POSIX.

It tells how absolute paths are recognized and written: the separator between segments, whether a path is absolute, and the root a path hangs from. Windows paths carry drive letters and UNC shares and accept both separators; POSIX paths root at /.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isPosix → bool
Whether this is the POSIX spelling.
no setter
isWindows → bool
Whether this is the Windows spelling.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
separator → String
Separator between the segments of a path.
no setter

Methods

driveRoot(String path) → String?
The root path hangs from: a drive (C:\), a UNC share (\\server\share\), or the plain root (\ or /). Returns null when path is relative.
isAbsolute(String path) → bool
Whether path is absolute: on Windows a drive (C:\...), a UNC share (\\server\share\...) or a rooted path (\... or /...), on POSIX a leading /.
join(String base, String relative) → String
Joins relative onto base, rewriting each / of relative to this spelling's separator.
normalize(String path) → String
path normalized to an absolute spelling: every separator becomes separator and every . and .. segment is resolved against the root driveRoot gives. Excess .. at the root are dropped; the spelling of the root itself is kept.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentOf(String path) → String?
The directory holding path, or null when path has no directory component: a drive root, a bare root or a relative path without an ancestor.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

posix → const GitPathStyle
POSIX spelling: / separator, a single root.
windows → const GitPathStyle
Windows spelling: \ separator, drives and UNC shares.