Java java.nio.file Path fields, constructors, methods, implement or subclass

Example usage for Java java.nio.file Path fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.nio.file Path.

The text is from its open source code.

Implementation

java.nio.file.Path has the following implementations.
Click this link to see all its implementation.

Method

intcompareTo(Path other)
Compares two abstract paths lexicographically.
booleanendsWith(Path other)
Tests if this path ends with the given path.
booleanendsWith(String other)
Tests if this path ends with a Path , constructed by converting the given path string, in exactly the manner specified by the #endsWith(Path) endsWith(Path) method.
booleanequals(Object other)
Tests this path for equality with the given object.
ClassgetClass()
Returns the runtime class of this Object .
PathgetFileName()
Returns the name of the file or directory denoted by this path as a Path object.
FileSystemgetFileSystem()
Returns the file system that created this object.
PathgetName(int index)
Returns a name element of this path as a Path object.
intgetNameCount()
Returns the number of name elements in the path.
PathgetParent()
Returns the parent path, or null if this path does not have a parent.
PathgetRoot()
Returns the root component of this path as a Path object, or null if this path does not have a root component.
inthashCode()
Computes a hash code for this path.
booleanisAbsolute()
Tells whether or not this path is absolute.
Iteratoriterator()
Returns an iterator over the name elements of this path.
Pathnormalize()
Returns a path that is this path with redundant name elements eliminated.
WatchKeyregister(WatchService watcher, WatchEvent.Kind... events)
Registers the file located by this path with a watch service.
WatchKeyregister(WatchService watcher, WatchEvent.Kind[] events, WatchEvent.Modifier... modifiers)
Registers the file located by this path with a watch service.
Pathrelativize(Path other)
Constructs a relative path between this path and a given path.
Pathresolve(Path other)
Resolve the given path against this path.
Pathresolve(String other)
Converts a given path string to a Path and resolves it against this Path in exactly the manner specified by the #resolve(Path) resolve method.
PathresolveSibling(Path other)
Resolves the given path against this path's #getParent parent path.
PathresolveSibling(String other)
Converts a given path string to a Path and resolves it against this path's #getParent parent path in exactly the manner specified by the #resolveSibling(Path) resolveSibling method.
booleanstartsWith(Path other)
Tests if this path starts with the given path.
booleanstartsWith(String other)
Tests if this path starts with a Path , constructed by converting the given path string, in exactly the manner specified by the #startsWith(Path) startsWith(Path) method.
Pathsubpath(int beginIndex, int endIndex)
Returns a relative Path that is a subsequence of the name elements of this path.
PathtoAbsolutePath()
Returns a Path object representing the absolute path of this path.
FiletoFile()
Returns a File object representing this path.
PathtoRealPath(LinkOption... options)
Returns the real path of an existing file.
StringtoString()
Returns the string representation of this path.
URItoUri()
Returns a URI to represent this path.