jdk/src/share/classes/java/nio/file/Path.java
changeset 9025 a72fc1fc4b71
parent 8808 fc799c458da8
child 9050 26c2c1de1631
equal deleted inserted replaced
9021:5cf29386a520 9025:a72fc1fc4b71
   548      * elements removed.
   548      * elements removed.
   549      *
   549      *
   550      * <p> If this path is relative then its absolute path is first obtained,
   550      * <p> If this path is relative then its absolute path is first obtained,
   551      * as if by invoking the {@link #toAbsolutePath toAbsolutePath} method.
   551      * as if by invoking the {@link #toAbsolutePath toAbsolutePath} method.
   552      *
   552      *
   553      * <p> The {@code resolveLinks} parameter specifies if symbolic links
   553      * <p> The {@code options} array may be used to indicate how symbolic links
   554      * should be resolved. This parameter is ignored when symbolic links are
   554      * are handled. By default, symbolic links are resolved to their final
   555      * not supported. Where supported, and the parameter has the value {@code
   555      * target. If the option {@link LinkOption#NOFOLLOW_LINKS NOFOLLOW_LINKS} is
   556      * true} then symbolic links are resolved to their final target. Where the
   556      * present then this method does not resolve symbolic links.
   557      * parameter has the value {@code false} then this method does not resolve
   557      *
   558      * symbolic links. Some implementations allow special names such as
   558      * Some implementations allow special names such as "{@code ..}" to refer to
   559      * "{@code ..}" to refer to the parent directory. When deriving the <em>real
   559      * the parent directory. When deriving the <em>real path</em>, and a
   560      * path</em>, and a "{@code ..}" (or equivalent) is preceded by a
   560      * "{@code ..}" (or equivalent) is preceded by a non-"{@code ..}" name then
   561      * non-"{@code ..}" name then an implementation will typically causes both
   561      * an implementation will typically cause both names to be removed. When
   562      * names to be removed. When not resolving symbolic links and the preceding
   562      * not resolving symbolic links and the preceding name is a symbolic link
   563      * name is a symbolic link then the names are only removed if it guaranteed
   563      * then the names are only removed if it guaranteed that the resulting path
   564      * that the resulting path will locate the same file as this path.
   564      * will locate the same file as this path.
       
   565      *
       
   566      * @param   options
       
   567      *          options indicating how symbolic links are handled
   565      *
   568      *
   566      * @return  an absolute path represent the <em>real</em> path of the file
   569      * @return  an absolute path represent the <em>real</em> path of the file
   567      *          located by this object
   570      *          located by this object
   568      *
   571      *
   569      * @throws  IOException
   572      * @throws  IOException
   574      *          method is invoked to check read access to the file, and where
   577      *          method is invoked to check read access to the file, and where
   575      *          this path is not absolute, its {@link SecurityManager#checkPropertyAccess(String)
   578      *          this path is not absolute, its {@link SecurityManager#checkPropertyAccess(String)
   576      *          checkPropertyAccess} method is invoked to check access to the
   579      *          checkPropertyAccess} method is invoked to check access to the
   577      *          system property {@code user.dir}
   580      *          system property {@code user.dir}
   578      */
   581      */
   579     Path toRealPath(boolean resolveLinks) throws IOException;
   582     Path toRealPath(LinkOption... options) throws IOException;
   580 
   583 
   581     /**
   584     /**
   582      * Returns a {@link File} object representing this path. Where this {@code
   585      * Returns a {@link File} object representing this path. Where this {@code
   583      * Path} is associated with the default provider, then this method is
   586      * Path} is associated with the default provider, then this method is
   584      * equivalent to returning a {@code File} object constructed with the
   587      * equivalent to returning a {@code File} object constructed with the