Lines Matching defs:Path

37  * <p> A {@code Path} represents a path that is hierarchical and composed of a
42 * The other name elements are directory names. A {@code Path} can represent a
44 * A {@code Path} is considered to be an <i>empty path</i> if it consists
47 * file system. {@code Path} defines the {@link #getFileName() getFileName},
52 * <p> In addition to accessing the components of a path, a {@code Path} also
53 * defines the {@link #resolve(Path) resolve} and {@link #resolveSibling(Path)
74 * Path path = FileSystems.getDefault().getPath("logs", "access.log");
84 * method may be used to obtain a {@code Path} from the abstract path name
85 * represented by a {@code java.io.File} object. The resulting {@code Path} can
88 * File} from the {@code String} representation of a {@code Path}.
98 public interface Path
99 extends Comparable<Path>, Iterable<Path>, Watchable
119 * Returns the root component of this path as a {@code Path} object,
125 Path getRoot();
129 * {@code Path} object. The file name is the <em>farthest</em> element from
135 Path getFileName();
160 Path getParent();
171 * Returns a name element of this path as a {@code Path} object.
188 Path getName(int index);
191 * Returns a relative {@code Path} that is a subsequence of the name
198 * count}{@code -1}. The returned {@code Path} object has the name elements
207 * @return a new {@code Path} object that is a subsequence of the name
208 * elements in this {@code Path}
215 Path subpath(int beginIndex, int endIndex);
240 boolean startsWith(Path other);
243 * Tests if this path starts with a {@code Path}, constructed by converting
245 * #startsWith(Path) startsWith(Path)} method. On UNIX for example, the path
256 * If the path string cannot be converted to a Path.
285 boolean endsWith(Path other);
288 * Tests if this path ends with a {@code Path}, constructed by converting
290 * #endsWith(Path) endsWith(Path)} method. On UNIX for example, the path
294 * Path}"{@code foo/bar}" with the {@code String} "{@code bar/}" returns
304 * If the path string cannot be converted to a Path.
333 Path normalize();
358 Path resolve(Path other);
361 * Converts a given path string to a {@code Path} and resolves it against
362 * this {@code Path} in exactly the manner specified by the {@link
363 * #resolve(Path) resolve} method. For example, suppose that the name
366 * the {@code Path} "{@code foo/bar/gus}".
374 * if the path string cannot be converted to a Path.
378 Path resolve(String other);
385 * this method with the {@code Path} "{@code bar}" will result in the {@code
386 * Path} "{@code dir1/dir2/bar}". If this path does not have a parent path,
397 * @see #resolve(Path)
399 Path resolveSibling(Path other);
402 * Converts a given path string to a {@code Path} and resolves it against
404 * specified by the {@link #resolveSibling(Path) resolveSibling} method.
412 * if the path string cannot be converted to a Path.
416 Path resolveSibling(String other);
421 * <p> Relativization is the inverse of {@link #resolve(Path) resolution}.
423 * that when {@link #resolve(Path) resolved} against this path, yields a
455 * if {@code other} is not a {@code Path} that can be relativized
458 Path relativize(Path other);
480 * to the {@link java.io.File} class. For a given {@code Path} <i>p</i> it
486 * so long as the original {@code Path}, the {@code URI}, and the new {@code
487 * Path} are all created in (possibly different invocations of) the same
514 * Returns a {@code Path} object representing the absolute path of this
517 * <p> If this path is already {@link Path#isAbsolute absolute} then this
523 * @return a {@code Path} object representing the absolute path
534 Path toAbsolutePath();
580 Path toRealPath(LinkOption... options) throws IOException;
584 * Path} is associated with the default provider, then this method is
596 * if this {@code Path} is not associated with the default provider
679 * Path dir = ...
727 Iterator<Path> iterator();
751 int compareTo(Path other);
756 * <p> If the given object is not a Path, or is a Path associated with a
772 * @return {@code true} if, and only if, the given object is a {@code Path}
773 * that is identical to this {@code Path}