PathUri class

A Uri like object that is specialized in file path handling.

Annotations
  • @immutable

Constructors

PathUri({required bool isAbsolute, required bool isDirectory, required BuiltList<String> pathSegments})
Creates a new path URI.
const
PathUri.cwd()
Creates a new empty path URI representing the current working directory.
factory
PathUri.parse(String path)
Creates a new PathUri object by parsing a path string.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
isAbsolute bool
Whether the path is an absolute path.
final
isDirectory bool
Whether the path is a directory.
final
name String
Returns the name of the last element in path.
no setter
parent PathUri?
Returns the parent of the path.
no setter
path String
Returns the path as a string.
no setter
pathSegments → BuiltList<String>
Returns the path as a list of its segments.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

join(PathUri other) PathUri
Joins the current path with another path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rename(String name) PathUri
Renames the last path segment and returns a new path URI.
toString() String
A string representation of this object.
override

Operators

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