Path class

Utility class for node and config/attribute paths.

Constructors

Path(String path)

Properties

hashCode int
The hash code for this object.
no setterinherited
isAbsolute bool
Is this an absolute path?
no setter
isAttribute bool
Is this an attribute?
no setter
isConfig bool
Is this a config?
no setter
isNode bool
Is this a node?
no setter
isRoot bool
Is this the root path?
no setter
name String
The name of this path. This is the last component of the path. For the root node, this is '/'
getter/setter pair
parent Path
Get the parent of this path.
no setter
parentPath String
Real Parent Path
getter/setter pair
path String
Real Path
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valid bool
If this path is invalid, this will be false. Otherwise this will be true.
getter/setter pair

Methods

child(String name) Path
Get a child of this path.
mergeBasePath(String? base, [bool force = false]) → void
Merges the base path with this path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

invalidChar RegExp
Regular Expression for invalid characters in paths.
final
invalidNameChar RegExp
Regular Expression for invalid characters in names.
final

Static Methods

escapeName(String str) String
getValidAttributePath(Object path, [String? basePath]) Path?
getValidConfigPath(Object path, [String? basePath]) Path?
getValidNodePath(Object path, [String? basePath]) Path?
getValidPath(Object path, [String? basePath]) Path?