Represents a path in a hierarchical file system. A path is a sequence of path elements. A path may be an absolute path that begins at the root of the file system, or a relative path.

no type hierarchy

no subtypes hierarchy

Attributes
absoluteSource Codeshared formal Boolean absolute

Determine if this is an absolute path.

absolutePathSource Codeshared formal Path absolutePath

This path, converted into an absolute path. If this path is already absolute, return this path. Otherwise, if this path is a relative path, resolve it against the file system's default directory.

elementPathsSource Codeshared formal Path[] elementPaths

The path elements of this path, as paths consisting of a single path element.

elementsSource Codeshared formal String[] elements

The path elements of this path, as strings.

Source Codeshared formal Link? link

Obtain a Link representing the symbolic link located at this path, or null if a symbolic link does not exist at this path.

normalizedPathSource Codeshared formal Path normalizedPath

This path, simplified to a canonical form.

parentSource Codeshared formal Path parent

The parent path of this path, formed by removing the last path element, or, if this path is the root path, and has no path elements, this root path.

resourceSource Codeshared formal Resource resource

Obtain a Resource representing the file or directory located at this path.

If a symbolic link exists at this path, and the symbolic link ultimately points to a file or directory, a File or Directory resource will be returned rather than a Link resource.

rootSource Codeshared formal Boolean root

Determine if this is a root path, with no elements.

separatorSource Codeshared formal String separator

The separator character used by this path.

stringSource Codeshared formal String string

This path, expressed as a string.

systemSource Codeshared formal System system

The System this is a path in.

uriStringSource Codeshared formal String uriString

This path, represented as a URI string.

Inherited Attributes
Attributes inherited from: Object
Methods
childOfSource Codeshared formal Boolean childOf(Path path)

Determine if this path is a child of the given path.

childPathSource Codeshared formal Path childPath(String|Path subpath)

This path, after appending the given path element.

parentOfSource Codeshared formal Boolean parentOf(Path path)

Determine if this path is a parent of the given path.

relativePathSource Codeshared formal Path relativePath(String|Path path)

This path, converted into a path relative to the given path.

siblingPathSource Codeshared formal Path siblingPath(String|Path subpath)

This path, after removing the last path element, and then appending the given path element.

visitSource Codeshared formal void visit(Visitor visitor)

Walk the tree of directories rooted at this path and visit files contained in this directory tree.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Comparable<Other>