Pertypath class

Constructors

Pertypath()

Properties

current → String
Gets the path to the current working directory.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
separator → String
Gets the path separator for the current platform. This is \ on Windows and / on other platforms (including the browser).
no setter

Methods

absolute(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7, String? part8, String? part9, String? part10, String? part11, String? part12, String? part13, String? part14, String? part15]) → String
Returns a new path with the given path parts appended to current.
basename(String path) → String
Gets the part of path after the last separator.
basenameWithoutExtension(String path) → String
Gets the part of path after the last separator, and without any trailing file extension.
canonicalize(String path) → String
Canonicalizes path.
dirname(String path) → String
Gets the part of path before the last separator.
equals(String path1, String path2) → bool
Returns true if path1 points to the same location as path2, and false otherwise.
extension(String path, [int level = 1]) → String
Gets the file extension of path: the portion of basename from the last . to the end (including the . itself).
fromUri(dynamic uri) → String
Returns the path represented by uri, which may be a String or a Uri.
hash(String path) → int
Returns a hash code for path such that, if equals returns true for two paths, their hash codes are the same.
override
isAbsolute(String path) → bool
Returns true if path is an absolute path and false if it is a relative path.
isRelative(String path) → bool
Returns true if path is a relative path and false if it is absolute. On POSIX systems, absolute paths start with a / (forward slash). On Windows, an absolute path starts with \\, or a drive letter followed by :/ or :\.
isRootRelative(String path) → bool
Returns true if path is a root-relative path and false if it's not.
isWithin(String parent, String child) → bool
Returns true if child is a path beneath parent, and false otherwise.
join(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7, String? part8, String? part9, String? part10, String? part11, String? part12, String? part13, String? part14, String? part15, String? part16]) → String
Joins the given path parts into a single path using the current platform's separator. Example:
joinAll(Iterable<String> parts) → String
Joins the given path parts into a single path using the current platform's separator. Example:
normalize(String path) → String
Normalizes path, simplifying it by handling .., and ., and removing redundant path separators whenever possible.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prettyUri(dynamic uri) → String
Returns a terse, human-readable representation of uri.
relative(String path, {String? from}) → String
Attempts to convert path to an equivalent relative path from the current directory.
rootPrefix(String path) → String
Returns the root of path, if it's absolute, or the empty string if it's relative.
setExtension(String path, String extension) → String
Returns path with the trailing extension set to extension.
split(String path) → List<String>
Splits path into its components using the current platform's separator.
toString() → String
A string representation of this object.
inherited
toUri(String path) → Uri
Returns the URI that represents path.
withoutExtension(String path) → String
Removes a trailing extension from the last part of path.

Operators

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