| Modifier and Type | Field and Description |
|---|---|
| private final FS | |
| private int | |
| protected final List | |
| protected final String | |
| private String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| protected T | |
| protected int | |
| protected T | |
| protected int | |
| public int | compareTo(Path
the path compared to this path. paramPath)Implements java. Compares two abstract paths lexicographically. |
| protected T | |
| protected T | |
| protected T | |
| protected boolean | |
| public boolean | endsWith(Path
the given path other)Implements java. Tests if this path ends with the given path. |
| public boolean | endsWith(String
the given path string other)Overrides default java. Tests if this path ends with a |
| public boolean | equals(Object
the object to which this object is to be compared obj)Overrides java. Implements java. Tests this path for equality with the given object. |
| public T | getFileName()
Implements java. Returns the name of the file or directory denoted by this path as a
|
| public FS | getFileSystem()
Implements java. Returns the file system that created this object. |
| public T | getName(int
the index of the element index)Implements java. Returns a name element of this path as a |
| public int | getNameCount()
Implements java. Returns the number of name elements in the path. |
| public T | getParent()
Implements java. Returns the parent path, or |
| public T | getRoot()
Implements java. Returns the root component of this path as a |
| public int | hashCode()
Overrides java. Implements java. Computes a hash code for this path. |
| public boolean | |
| protected boolean | |
| public Iterator | iterator()
Overrides default java. Returns an iterator over the name elements of this path. |
| public T | normalize()
Implements java. Returns a path that is this path with redundant name elements eliminated. |
| public WatchKey | register(WatchService
The watch service to which this object is to be registered watcher, WatchEvent.The events for which this object should be registered eventsOverrides default java. Registers the file located by this path with a watch service. |
| public WatchKey | register(WatchService
the watch service to which this object is to be registered watcher, WatchEvent.the events for which this object should be registered events,the modifiers, if any, that modify how the object is registered modifiersImplements java. Registers the file located by this path with a watch service. |
| public T | relativize(Path
the path to relativize against this path other)Implements java. Constructs a relative path between this path and a given path. |
| public T | resolve(Path
the path to resolve against this path other)Implements java. Resolve the given path against this path. |
| public T | resolve(String
the path string to resolve against this path other)Overrides default java. Converts a given path string to a |
| public Path | resolveSibling(Path
the path to resolve against this path's parent other)Overrides default java. Resolves the given path against this path's |
| public Path | resolveSibling(String
the path string to resolve against this path's parent other)Overrides default java. Converts a given path string to a |
| protected boolean | |
| public boolean | startsWith(Path
the given path other)Implements java. Tests if this path starts with the given path. |
| public boolean | startsWith(String
the given path string other)Overrides default java. Tests if this path starts with a |
| public T | subpath(int
the index of the first element, inclusive beginIndex, int the index of the last element, exclusive endIndex)Implements java. Returns a relative |
| public T | toAbsolutePath()
Implements java. Returns a |
| public File | |
| public String | toString()
Overrides java. Implements java. Returns the string representation of this path. |
| public URI |
| fileSystem | back to summary |
|---|---|
| private final FS fileSystem | |
| hashValue | back to summary |
|---|---|
| private int hashValue | |
| names | back to summary |
|---|---|
| protected final List<String> names | |
| root | back to summary |
|---|---|
| protected final String root | |
| strValue | back to summary |
|---|---|
| private String strValue | |
| BasePath | back to summary |
|---|---|
| protected BasePath(FS fileSystem, String root, List<String> names) | |
| asString | back to summary |
|---|---|
| protected String asString() | |
| asT | back to summary |
|---|---|
protected T asT()
| |
| calculatedHashCode | back to summary |
|---|---|
| protected int calculatedHashCode() | |
| checkPath | back to summary |
|---|---|
protected T checkPath(Path paramPath)
| |
| compare | back to summary |
|---|---|
| protected int compare(String s1, String s2) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Path paramPath) Implements java. Doc from java. Compares two abstract paths lexicographically. The ordering defined by this method is provider specific, and in the case of the default provider, platform specific. This method does not access the file system and neither file is required to exist. This method may not be used to compare paths that are associated with different file system providers. | |
| create | back to summary |
|---|---|
| protected T create(String root, String... names) | |
| create | back to summary |
|---|---|
| protected T create(String root, Collection<String> names) | |
| create | back to summary |
|---|---|
| protected T create(String root, List<String> names) | |
| endsWith | back to summary |
|---|---|
| protected boolean endsWith(List<?> list, List<?> other) | |
| endsWith | back to summary |
|---|---|
| public boolean endsWith(Path other) Implements java. Doc from java. Tests if this path ends with the given path. If the given path has N elements, and no root component, and this path has N or more elements, then this path ends with the given path if the last N elements of each path, starting at the element farthest from the root, are equal. If the given path has a root component then this path ends with the given path if the root component of this path ends with the root component of the given path, and the corresponding elements of both paths are equal. Whether or not the root component of this path ends with the root component of the given path is file system specific. If this path does not have a root component and the given path has a root component then this path does not end with the given path. If the given path is associated with a different | |
| endsWith | back to summary |
|---|---|
| public boolean endsWith(String other) Overrides default java. Doc from java. Tests if this path ends with a | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements java. Doc from java. Tests this path for equality with the given object. If the given object is not a Path, or is a Path associated with a
different Whether or not two path are equal depends on the file system
implementation. In some cases the paths are compared without regard
to case, and others are case sensitive. This method does not access the
file system and the file is not required to exist. Where required, the
This method satisfies the general contract of the | |
| getFileName | back to summary |
|---|---|
| public T getFileName() Implements java. Doc from java. Returns the name of the file or directory denoted by this path as a
| |
| getFileSystem | back to summary |
|---|---|
| public FS getFileSystem() Implements java. Doc from java. Returns the file system that created this object.
| |
| getName | back to summary |
|---|---|
| public T getName(int index) Implements java. Doc from java. Returns a name element of this path as a The
| |
| getNameCount | back to summary |
|---|---|
| public int getNameCount() Implements java. Doc from java. Returns the number of name elements in the path.
| |
| getParent | back to summary |
|---|---|
| public T getParent() Implements java. Doc from java. Returns the parent path, or The parent of this path object consists of this path's root
component, if any, and each element in the path except for the
farthest from the root in the directory hierarchy. This method
does not access the file system; the path or its parent may not exist.
Furthermore, this method does not eliminate special names such as "."
and ".." that may be used in some implementations. On UNIX for example,
the parent of " If this path has more than one element, and no root component, then this method is equivalent to evaluating the expression: subpath(0, getNameCount()-1);
| |
| getRoot | back to summary |
|---|---|
| public T getRoot() Implements java. Doc from java. Returns the root component of this path as a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Computes a hash code for this path. The hash code is based upon the components of the path, and
satisfies the general contract of the
| |
| isAbsolute | back to summary |
|---|---|
| public boolean isAbsolute() Implements java. Doc from java. Tells whether or not this path is absolute. An absolute path is complete in that it doesn't need to be combined with other path information in order to locate a file.
| |
| isNormal | back to summary |
|---|---|
| protected boolean isNormal() | |
| iterator | back to summary |
|---|---|
| public Iterator Overrides default java. Doc from java. Returns an iterator over the name elements of this path. The first element returned by the iterator represents the name
element that is closest to the root in the directory hierarchy, the
second element is the next closest, and so on. The last element returned
is the name of the file or directory denoted by this path. The | |
| normalize | back to summary |
|---|---|
| public T normalize() Implements java. Doc from java. Returns a path that is this path with redundant name elements eliminated. The precise definition of this method is implementation dependent but
in general it derives from this path, a path that does not contain
redundant name elements. In many file systems, the " This method does not access the file system; the path may not locate
a file that exists. Eliminating "
| |
| register | back to summary |
|---|---|
| public WatchKey register(WatchService watcher, WatchEvent. Overrides default java. Doc from java. Registers the file located by this path with a watch service. An invocation of this method behaves in exactly the same way as the invocation register(watcher, events, new WatchEvent.Modifier[0]); Usage Example: Suppose we wish to register a directory for entry create, delete, and modify events: Path dir = ... WatchService watcher = ... WatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
| |
| register | back to summary |
|---|---|
| public WatchKey register(WatchService watcher, WatchEvent. Implements java. Doc from java. Registers the file located by this path with a watch service. In this release, this path locates a directory that exists. The
directory is registered with the watch service so that entries in the
directory can be watched. The
The The set of events may include additional implementation specific
event that are not defined by the enum The Where a file is registered with a watch service by means of a symbolic link then it is implementation specific if the watch continues to depend on the existence of the symbolic link after it is registered.
| |
| relativize | back to summary |
|---|---|
| public T relativize(Path other) Implements java. Doc from java. Constructs a relative path between this path and a given path. Relativization is the inverse of For any two p When symbolic links are supported, then whether the resulting path,
when resolved against this path, yields a path that can be used to locate
the | |
| resolve | back to summary |
|---|---|
| public T resolve(Path other) Implements java. Doc from java. Resolve the given path against this path. If the | |
| resolve | back to summary |
|---|---|
| public T resolve(String other) Overrides default java. Doc from java. Converts a given path string to a | |
| resolveSibling | back to summary |
|---|---|
| public Path resolveSibling(Path other) Overrides default java. Doc from java. Resolves the given path against this path's | |
| resolveSibling | back to summary |
|---|---|
| public Path resolveSibling(String other) Overrides default java. Doc from java. Converts a given path string to a | |
| startsWith | back to summary |
|---|---|
| protected boolean startsWith(List<?> list, List<?> other) | |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(Path other) Implements java. Doc from java. Tests if this path starts with the given path. This path starts with the given path if this path's root
component starts with the root component of the given path,
and this path starts with the same name elements as the given path.
If the given path has more name elements than this path then Whether or not the root component of this path starts with the root component of the given path is file system specific. If this path does not have a root component and the given path has a root component then this path does not start with the given path. If the given path is associated with a different | |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(String other) Overrides default java. Doc from java. Tests if this path starts with a | |
| subpath | back to summary |
|---|---|
| public T subpath(int beginIndex, int endIndex) Implements java. Doc from java. Returns a relative The
| |
| toAbsolutePath | back to summary |
|---|---|
| public T toAbsolutePath() Implements java. Doc from java. Returns a If this path is already
| |
| toFile | back to summary |
|---|---|
| public File toFile() Overrides default java. Doc from java. Returns a If this path was created by invoking the | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Doc from java. Returns the string representation of this path. If this path was created by converting a path string using the
The returned path string uses the default name | |
| toUri | back to summary |
|---|---|
| public URI toUri() Implements java. Doc from java. Returns a URI to represent this path. This method constructs an absolute In the case of the default provider, the URI is hierarchical with
a The default provider provides a similar round-trip guarantee
to the so long as the original Path, the URI, and the new Path are all created in (possibly different invocations of) the same
Java virtual machine. Whether other providers make any guarantees is
provider specific and therefore unspecified.
When a file system is constructed to access the contents of a file as a file system then it is highly implementation specific if the returned URI represents the given path in the file system or it represents a compound URI that encodes the URI of the enclosing file system. A format for compound URIs is not defined in this release; such a scheme may be added in a future release. | |