505 *
506 * @throws SecurityException
507 * In the case of the default provider, and a security manager
508 * is installed, the {@link #toAbsolutePath toAbsolutePath} method
509 * throws a security exception.
510 */
511 URI toUri();
512
513 /**
514 * Returns a {@code Path} object representing the absolute path of this
515 * path.
516 *
517 * <p> If this path is already {@link Path#isAbsolute absolute} then this
518 * method simply returns this path. Otherwise, this method resolves the path
519 * in an implementation dependent manner, typically by resolving the path
520 * against a file system default directory. Depending on the implementation,
521 * this method may throw an I/O error if the file system is not accessible.
522 *
523 * @return a {@code Path} object representing the absolute path
524 *
525 * @throws IOError
526 * if an I/O error occurs
527 * @throws SecurityException
528 * In the case of the default provider, a security manager
529 * is installed, and this path is not absolute, then the security
530 * manager's {@link SecurityManager#checkPropertyAccess(String)
531 * checkPropertyAccess} method is invoked to check access to the
532 * system property {@code user.dir}
533 */
534 Path toAbsolutePath();
535
536 /**
537 * Returns the <em>real</em> path of an existing file.
538 *
539 * <p> The precise definition of this method is implementation dependent but
540 * in general it derives from this path, an {@link #isAbsolute absolute}
541 * path that locates the {@link Files#isSameFile same} file as this path, but
542 * with name elements that represent the actual name of the directories
543 * and the file. For example, where filename comparisons on a file system
544 * are case insensitive then the name elements represent the names in their
545 * actual case. Additionally, the resulting path has redundant name
|
505 *
506 * @throws SecurityException
507 * In the case of the default provider, and a security manager
508 * is installed, the {@link #toAbsolutePath toAbsolutePath} method
509 * throws a security exception.
510 */
511 URI toUri();
512
513 /**
514 * Returns a {@code Path} object representing the absolute path of this
515 * path.
516 *
517 * <p> If this path is already {@link Path#isAbsolute absolute} then this
518 * method simply returns this path. Otherwise, this method resolves the path
519 * in an implementation dependent manner, typically by resolving the path
520 * against a file system default directory. Depending on the implementation,
521 * this method may throw an I/O error if the file system is not accessible.
522 *
523 * @return a {@code Path} object representing the absolute path
524 *
525 * @throws java.io.IOError
526 * if an I/O error occurs
527 * @throws SecurityException
528 * In the case of the default provider, a security manager
529 * is installed, and this path is not absolute, then the security
530 * manager's {@link SecurityManager#checkPropertyAccess(String)
531 * checkPropertyAccess} method is invoked to check access to the
532 * system property {@code user.dir}
533 */
534 Path toAbsolutePath();
535
536 /**
537 * Returns the <em>real</em> path of an existing file.
538 *
539 * <p> The precise definition of this method is implementation dependent but
540 * in general it derives from this path, an {@link #isAbsolute absolute}
541 * path that locates the {@link Files#isSameFile same} file as this path, but
542 * with name elements that represent the actual name of the directories
543 * and the file. For example, where filename comparisons on a file system
544 * are case insensitive then the name elements represent the names in their
545 * actual case. Additionally, the resulting path has redundant name
|