| Modifier and Type | Field and Description |
|---|---|
| private final UnixFileSystem | |
| private int | |
| private static final JavaLangAccess | |
| private volatile int[] | |
| private final byte[] | |
| private String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv byte[] | |
| private static void | |
| public int | compareTo(Path other)
Implements java. Compares two abstract paths lexicographically. |
| private UnixPath | |
| private static byte[] | |
| public boolean | endsWith(Path other)
Implements java. Tests if this path ends with the given path. |
| public boolean | equals(Object ob)
Overrides java. Implements java. Tests this path for equality with the given object. |
| pack-priv byte[] | |
| public UnixPath | getFileName()
Implements java. Returns the name of the file or directory denoted by this path as a
|
| public UnixFileSystem | getFileSystem()
Implements java. Returns the file system that created this object. |
| public UnixPath | getName(int 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 UnixPath | getParent()
Implements java. Returns the parent path, or |
| pack-priv String | |
| pack-priv String | |
| public UnixPath | getRoot()
Implements java. Returns the root component of this path as a |
| private boolean | |
| public int | hashCode()
Overrides java. Implements java. Computes a hash code for this path. |
| private void | |
| public boolean | |
| pack-priv boolean | |
| private static String | |
| public UnixPath | normalize()
Implements java. Returns a path that is this path with redundant name elements eliminated. |
| pack-priv static String | |
| pack-priv int | |
| public WatchKey | register(WatchService watcher, WatchEvent.
Implements java. Registers the file located by this path with a watch service. |
| public UnixPath | relativize(Path obj)
Implements java. Constructs a relative path between this path and a given path. |
| private static byte[] | |
| public UnixPath | |
| pack-priv UnixPath | |
| private static final byte[] | |
| public UnixPath | resolve(Path first, Path... more)
Overrides default java. Resolves a path against this path, and then iteratively resolves any additional paths. |
| public boolean | startsWith(Path other)
Implements java. Tests if this path starts with the given path. |
| public UnixPath | subpath(int beginIndex, int endIndex)
Implements java. Returns a relative |
| public UnixPath | toAbsolutePath()
Implements java. Returns a |
| public Path | toRealPath(LinkOption... options)
Implements java. Returns the real path of an existing file. |
| public String | toString()
Overrides java. Implements java. Returns the string representation of this path. |
| pack-priv static UnixPath | |
| public URI |
| fs | back to summary |
|---|---|
| private final UnixFileSystem fs | |
| hash | back to summary |
|---|---|
| private int hash | |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| offsets | back to summary |
|---|---|
| private volatile int[] offsets | |
| path | back to summary |
|---|---|
| private final byte[] path | |
| stringValue | back to summary |
|---|---|
| private String stringValue
| |
| UnixPath | back to summary |
|---|---|
| pack-priv UnixPath(UnixFileSystem fs, byte[] path) | |
| UnixPath | back to summary |
|---|---|
| pack-priv UnixPath(UnixFileSystem fs, String input) | |
| asByteArray | back to summary |
|---|---|
| pack-priv byte[] asByteArray() | |
| checkNotNul | back to summary |
|---|---|
| private static void checkNotNul(String input, char c) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Path other) 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.
| |
| emptyPath | back to summary |
|---|---|
| private UnixPath emptyPath() | |
| encode | back to summary |
|---|---|
| private static byte[] encode(UnixFileSystem fs, String input) | |
| 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
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object ob) 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
| |
| getByteArrayForSysCalls | back to summary |
|---|---|
| pack-priv byte[] getByteArrayForSysCalls() | |
| getFileName | back to summary |
|---|---|
| public UnixPath 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 UnixFileSystem getFileSystem() Implements java. Doc from java. Returns the file system that created this object.
| |
| getName | back to summary |
|---|---|
| public UnixPath 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 UnixPath 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);
| |
| getPathForExceptionMessage | back to summary |
|---|---|
| pack-priv String getPathForExceptionMessage() | |
| getPathForPermissionCheck | back to summary |
|---|---|
| pack-priv String getPathForPermissionCheck() | |
| getRoot | back to summary |
|---|---|
| public UnixPath getRoot() Implements java. Doc from java. Returns the root component of this path as a
| |
| hasDotOrDotDot | back to summary |
|---|---|
| private boolean hasDotOrDotDot() | |
| 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
| |
| initOffsets | back to summary |
|---|---|
| private void initOffsets() | |
| 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.
| |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() | |
| normalize | back to summary |
|---|---|
| private static String normalize(String input, int len, int off) | |
| normalize | back to summary |
|---|---|
| public UnixPath 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 "
| |
| normalizeAndCheck | back to summary |
|---|---|
| pack-priv static String normalizeAndCheck(String input) | |
| openForAttributeAccess | back to summary |
|---|---|
| pack-priv int openForAttributeAccess(boolean followLinks) throws UnixException | |
| 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 UnixPath relativize(Path obj) 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 |
|---|---|
| private static byte[] resolve(byte[] base, byte[] child) | |
| resolve | back to summary |
|---|---|
| public UnixPath resolve(Path obj) Implements java. Doc from java. Resolve the given path against this path. If the
| |
| resolve | back to summary |
|---|---|
| pack-priv UnixPath resolve(byte[] other) | |
| resolve | back to summary |
|---|---|
| private static final byte[] resolve(byte[] base, byte[]... children) | |
| resolve | back to summary |
|---|---|
| public UnixPath resolve(Path first, Path... more) Overrides default java. Doc from java. Resolves a path against this path, and then iteratively resolves any additional paths. This method resolves
| |
| 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
| |
| subpath | back to summary |
|---|---|
| public UnixPath subpath(int beginIndex, int endIndex) Implements java. Doc from java. Returns a relative The
| |
| toAbsolutePath | back to summary |
|---|---|
| public UnixPath toAbsolutePath() Implements java. Doc from java. Returns a If this path is already
| |
| toRealPath | back to summary |
|---|---|
| public Path toRealPath(LinkOption... options) throws IOException Implements java. Doc from java. Returns the real path of an existing file. The precise definition of this method is implementation dependent but
in general it derives from this path, an If this path is relative then its absolute path is first obtained,
as if by invoking the 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
| |
| toUnixPath | back to summary |
|---|---|
| pack-priv static UnixPath toUnixPath(Path obj) | |
| 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.
| |