Class Paths::PathExpr

An expression whose value represents a (relative or absolute) file system path.

Each path expression is associated with one or more root folders, each of which has a priority. Root folders with numerically smaller properties are preferred, meaning that a path expression is interpreted relative to the root folder with the smallest priority for which the path can be resolved.

For example, path expressions inside a module may have that module’s folder as their highest-priority root, with default library paths as additional roots of lower priority.

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getBaseName

Gets the base name of the folder or file this path refers to.

getComponent

Gets the ith component of this path.

getNumComponent

Gets the number of components of this path.

getSearchRoot

Gets the root folder of priority priority associated with this path expression.

getValue

Gets the (unresolved) path represented by this expression.

resolve

Gets the file or folder that this path refers to when resolved relative to the root folder of the given priority.

resolve

Gets the file or folder that this path refers to.

resolveUpTo

Gets the file or folder that the first n components of this path refer to when resolved relative to the root folder of the given priority.

resolveUpTo

Gets the file or folder that the first n components of this path refer to.

Inherited predicates

getEnclosingModule

Gets the module containing this path expression, if any.

from PathExprBase
getEndLine

Gets the line on which this element ends.

from Locatable
getFile

Gets the file this program element comes from.

from Locatable
getLocation

Gets this element’s location.

from Locatable
getNumLines

Gets the number of lines covered by this element.

from Locatable
getStartLine

Gets the line on which this element starts.

from Locatable
toString

Gets a textual representation of this element.

from Locatable