ceylon.file
Interface Path

Satisfied Interfaces: Comparable<Path>

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

Attributes
Modifier and TypeName and Description
shared formal Booleanabsolute

Determine if this is an absolute path.

shared formal PathabsolutePath

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 filesystem's default directory.

shared formal Path[]elementPaths

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

shared formal String[]elements

The path elements of this path, as strings.

shared formal PathnormalizedPath

This path, simplified to a canonical form.

shared formal Pathparent

This path, after removing the last path element.

shared formal Resourceresource

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

shared formal Stringseparator

The separator character used by this path.

shared formal Stringstring

This path, expressed as a string.

shared formal Systemsystem

The System this is a path in.

shared formal StringuriString

This path, represented as a URI string.

Methods
Modifier and TypeMethod and Description
shared formal BooleanchildOf(Path path)

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

shared formal PathchildPath(String|Path subpath)

This path, after appending the given path element.

shared formal BooleanparentOf(Path path)

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

shared formal PathrelativePath(String|Path path)

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

shared formal PathsiblingPath(String|Path subpath)

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

shared formal Voidvisit(Visitor visitor)

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