Lines Matching refs:link

118      * will not be buffered, and is not required to support the {@link
119 * InputStream#mark mark} or {@link InputStream#reset reset} methods. The
127 * the {@link StandardOpenOption#READ READ} option. In addition to the {@code
146 * installed, the {@link SecurityManager#checkRead(String) checkRead}
164 * by the {@link #newByteChannel(Path,Set,FileAttribute[]) newByteChannel}
165 * method with the exception that the {@link StandardOpenOption#READ READ}
167 * present then this method works as if the {@link StandardOpenOption#CREATE
168 * CREATE}, {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING},
169 * and {@link StandardOpenOption#WRITE WRITE} options are present. In other
171 * exist, or initially truncating an existing {@link #isRegularFile
207 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
208 * method is invoked to check write access to the file. The {@link
224 * The {@link StandardOpenOption#READ READ} and {@link
226 * opened for reading and/or writing. If neither option (or the {@link
237 * <td> {@link StandardOpenOption#APPEND APPEND} </td>
247 * <td> {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} </td>
253 * <td> {@link StandardOpenOption#CREATE_NEW CREATE_NEW} </td>
255 * the file already exists or is a symbolic link. When creating a file the
261 * <td > {@link StandardOpenOption#CREATE CREATE} </td>
268 * <td > {@link StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} </td>
271 * {@link SeekableByteChannel#close close} method. If the {@code close}
276 * <td>{@link StandardOpenOption#SPARSE SPARSE} </td>
282 * <td> {@link StandardOpenOption#SYNC SYNC} </td>
289 * <td> {@link StandardOpenOption#DSYNC DSYNC} </td>
300 * <p> The {@code attrs} parameter is optional {@link FileAttribute
304 * is a {@link java.nio.channels.FileChannel}.
338 * if a file of that name already exists and the {@link
345 * installed, the {@link SecurityManager#checkRead(String) checkRead}
347 * opened for reading. The {@link SecurityManager#checkWrite(String)
349 * if the file is opened for writing. The {@link
369 * by the {@link #newByteChannel(Path,Set,FileAttribute[]) newByteChannel}
384 * if a file of that name already exists and the {@link
391 * installed, the {@link SecurityManager#checkRead(String) checkRead}
393 * opened for reading. The {@link SecurityManager#checkWrite(String)
395 * if the file is opened for writing. The {@link
424 * Opens a directory, returning a {@link DirectoryStream} to iterate over
426 * stream's {@link DirectoryStream#iterator iterator} are of type {@code
428 * objects are obtained as if by {@link Path#resolve(Path) resolving} the
437 * stream is a {@link SecureDirectoryStream}.
451 * installed, the {@link SecurityManager#checkRead(String) checkRead}
461 * Opens a directory, returning a {@link DirectoryStream} to iterate over
463 * stream's {@link DirectoryStream#iterator iterator} are of type {@code
465 * objects are obtained as if by {@link Path#resolve(Path) resolving} the
479 * <p> The globbing pattern is specified by the {@link
488 * stream is a {@link SecureDirectoryStream}.
506 * installed, the {@link SecurityManager#checkRead(String) checkRead}
529 * Opens a directory, returning a {@link DirectoryStream} to iterate over
531 * stream's {@link DirectoryStream#iterator iterator} are of type {@code
533 * objects are obtained as if by {@link Path#resolve(Path) resolving} the
535 * the iterator are filtered by the given {@link DirectoryStream.Filter
543 * exception then it is propagated to the {@link Iterator#hasNext()
544 * hasNext} or {@link Iterator#next() next} method. Where an {@code
546 * next} method throwing a {@link DirectoryIteratorException} with the
551 * stream is a {@link SecureDirectoryStream}.
582 * installed, the {@link SecurityManager#checkRead(String) checkRead}
600 * <p> The {@code attrs} parameter is optional {@link FileAttribute
602 * is identified by its {@link FileAttribute#name name}. If more than one
624 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
640 * affect the directory. The {@link #createDirectories createDirectories}
644 * <p> The {@code attrs} parameter is optional {@link FileAttribute
646 * attribute is identified by its {@link FileAttribute#name name}. If more
668 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
680 * Unlike the {@link #createDirectory createDirectory} method, an exception
684 * <p> The {@code attrs} parameter is optional {@link FileAttribute
686 * directories. Each file attribute is identified by its {@link
712 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
714 * its {@link SecurityManager#checkRead(String) checkRead} is
716 * dir} is not an absolute path then its {@link Path#toAbsolutePath
718 * This may invoke the security manager's {@link
797 * names in the same manner as the {@link
802 * the resulting file may be opened using the {@link
805 * Alternatively, a {@link Runtime#addShutdownHook shutdown-hook}, or the
806 * {@link java.io.File#deleteOnExit} mechanism may be used to delete the
809 * <p> The {@code attrs} parameter is optional {@link FileAttribute
811 * is identified by its {@link FileAttribute#name name}. If more than one
815 * created by the {@link java.io.File#createTempFile(String,String,File)}
843 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
862 * {@link #createTempFile(Path,String,String,FileAttribute[])} method for
889 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
910 * part of a temporary-file facility. A {@link Runtime#addShutdownHook
911 * shutdown-hook}, or the {@link java.io.File#deleteOnExit} mechanism may be
914 * <p> The {@code attrs} parameter is optional {@link FileAttribute
916 * attribute is identified by its {@link FileAttribute#name name}. If more
941 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
959 * <p> This method works in exactly the manner specified by {@link
983 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
995 * Creates a symbolic link to a target <i>(optional operation)</i>.
997 * <p> The {@code target} parameter is the target of the link. It may be an
998 * {@link Path#isAbsolute absolute} or relative path and may not exist. When
1000 * link are relative to the path of the link.
1002 * <p> The {@code attrs} parameter is optional {@link FileAttribute
1003 * attributes} to set atomically when creating the link. Each attribute is
1004 * identified by its {@link FileAttribute#name name}. If more than one attribute
1008 * <p> Where symbolic links are supported, but the underlying {@link FileStore}
1009 * does not support symbolic links, then this may fail with an {@link
1014 * @param link
1015 * the path of the symbolic link to create
1017 * the target of the symbolic link
1020 * symbolic link
1022 * @return the path to the symbolic link
1027 * creating the symbolic link
1035 * is installed, it denies {@link LinkPermission}<tt>("symbolic")</tt>
1036 * or its {@link SecurityManager#checkWrite(String) checkWrite}
1037 * method denies write access to the path of the symbolic link.
1039 public static Path createSymbolicLink(Path link, Path target,
1043 provider(link).createSymbolicLink(link, target, attrs);
1044 return link;
1048 * Creates a new link (directory entry) for an existing file <i>(optional
1051 * <p> The {@code link} parameter locates the directory entry to create.
1054 * accessed using {@code link} as the path. On some file systems this is
1055 * known as creating a "hard link". Whether the file attributes are
1063 * @param link
1064 * the link (directory entry) to create
1068 * @return the path to the link (directory entry)
1080 * is installed, it denies {@link LinkPermission}<tt>("hard")</tt>
1081 * or its {@link SecurityManager#checkWrite(String) checkWrite}
1082 * method denies write access to either the link or the
1085 public static Path createLink(Path link, Path existing) throws IOException {
1086 provider(link).createLink(link, existing);
1087 return link;
1095 * to other file system operations. If the file is a symbolic link then the
1096 * symbolic link itself, not the final target of the link, is deleted.
1102 * This method can be used with the {@link #walkFileTree walkFileTree}
1122 * installed, the {@link SecurityManager#checkDelete(String)} method
1132 * <p> As with the {@link #delete(Path) delete(Path)} method, an
1135 * other file system operations. If the file is a symbolic link, then the
1136 * symbolic link itself, not the final target of the link, is deleted.
1161 * installed, the {@link SecurityManager#checkDelete(String)} method
1175 * copy fails if the target file already exists or is a symbolic link,
1176 * except if the source and target are the {@link #isSameFile same} file, in
1179 * supported, and the file is a symbolic link, then the final target of the
1180 * link is copied. If the file is a directory then it creates an empty
1182 * copied). This method can be used with the {@link #walkFileTree
1191 * <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
1194 * symbolic link, then the symbolic link itself, not the target of
1195 * the link, is replaced. </td>
1198 * <td> {@link StandardCopyOption#COPY_ATTRIBUTES COPY_ATTRIBUTES} </td>
1202 * {@link BasicFileAttributes#lastModifiedTime last-modified-time} is
1208 * <td> {@link LinkOption#NOFOLLOW_LINKS NOFOLLOW_LINKS} </td>
1209 * <td> Symbolic links are not followed. If the file is a symbolic link,
1210 * then the symbolic link itself, not the target of the link, is copied.
1212 * new link. In other words, the {@code COPY_ATTRIBUTES} option may be
1213 * ignored when copying a symbolic link. </td>
1220 * <p> Copying a file is not an atomic operation. If an {@link IOException}
1261 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1263 * {@link SecurityManager#checkWrite(String) checkWrite} is invoked
1264 * to check write access to the target file. If a symbolic link is
1265 * copied the security manager is invoked to check {@link
1287 * target are the {@link #isSameFile same} file, in which case this method
1288 * has no effect. If the file is a symbolic link then the symbolic link
1289 * itself, not the target of the link, is moved. This method may be
1296 * directory on the same {@link FileStore} will usually not require moving
1300 * than moving directories and this can be done using the {@link
1301 * #copy copy} method in conjunction with the {@link
1309 * <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
1312 * symbolic link, then the symbolic link itself, not the target of
1313 * the link, is replaced. </td>
1316 * <td> {@link StandardCopyOption#ATOMIC_MOVE ATOMIC_MOVE} </td>
1320 * fails by throwing an {@link IOException}. If the move cannot be
1321 * performed as an atomic file system operation then {@link
1331 * <p> Moving a file will copy the {@link
1385 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
1406 * Reads the target of a symbolic link <i>(optional operation)</i>.
1409 * links</a> then this method is used to read the target of the link, failing
1410 * if the file is not a symbolic link. The target of the link need not exist.
1412 * system as {@code link}.
1414 * @param link
1415 * the path to the symbolic link
1417 * @return a {@code Path} object representing the target of the link
1423 * is not a symbolic link <i>(optional specific exception)</i>
1429 * granted with the "{@code readlink}" action to read the link.
1431 public static Path readSymbolicLink(Path link) throws IOException {
1432 return provider(link).readSymbolicLink(link);
1436 * Returns the {@link FileStore} representing the file store where a file
1441 * or {@link FileStoreAttributeView} objects obtained from it, continue
1455 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1457 * addition it checks {@link RuntimePermission}<tt>
1467 * <p> If both {@code Path} objects are {@link Path#equals(Object) equal}
1498 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1512 * isn't a directory and the DOS {@link DosFileAttributes#isHidden hidden}
1527 * installed, the {@link SecurityManager#checkRead(String) checkRead}
1569 * <p> This method uses the installed {@link FileTypeDetector} implementations
1571 * detector's {@link FileTypeDetector#probeContentType probeContentType} is
1579 * using the service-provider loading facility defined by the {@link ServiceLoader}
1637 * The {@link BasicFileAttributeView} type supports access to the basic
1643 * file is a symbolic link. By default, symbolic links are followed. If the
1644 * option {@link LinkOption#NOFOLLOW_LINKS NOFOLLOW_LINKS} is present then
1689 * are handled for the case that the file is a symbolic link. By default,
1691 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
1727 * installed, its {@link SecurityManager#checkRead(String) checkRead}
1751 * <p> <i>view-name</i> is the {@link FileAttributeView#name name} of a {@link
1759 * are handled for the case that the file is a symbolic link. By default,
1761 * of the link is set. If the option {@link LinkOption#NOFOLLOW_LINKS
1796 * installed, its {@link SecurityManager#checkWrite(String) checkWrite}
1820 * <p> <i>view-name</i> is the {@link FileAttributeView#name name} of a {@link
1827 * are handled for the case that the file is a symbolic link. By default,
1829 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
1857 * installed, its {@link SecurityManager#checkRead(String) checkRead}
1892 * <p> <i>view-name</i> is the {@link FileAttributeView#name name} of a {@link
1912 * <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
1921 * <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td>
1931 * are handled for the case that the file is a symbolic link. By default,
1933 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
1955 * installed, its {@link SecurityManager#checkRead(String) checkRead}
1971 * that supports the {@link PosixFileAttributeView}. This attribute view
1977 * are handled for the case that the file is a symbolic link. By default,
1979 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
1996 * installed, and it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
1997 * or its {@link SecurityManager#checkRead(String) checkRead} method
2011 * that supports the {@link PosixFileAttributeView}. This attribute view
2033 * installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
2034 * or its {@link SecurityManager#checkWrite(String) checkWrite}
2053 * supports {@link FileOwnerAttributeView}. This file attribute view provides
2070 * installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
2071 * or its {@link SecurityManager#checkRead(String) checkRead} method
2086 * supports {@link FileOwnerAttributeView}. This file attribute view provides
2113 * installed, it denies {@link RuntimePermission}<tt>("accessUserInformation")</tt>
2114 * or its {@link SecurityManager#checkWrite(String) checkWrite}
2132 * Tests whether a file is a symbolic link.
2135 * that the file is not a symbolic link then the file attributes can be
2136 * read with the {@link #readAttributes(Path,Class,LinkOption[])
2137 * readAttributes} method and the file type tested with the {@link
2142 * @return {@code true} if the file is a symbolic link; {@code false} if
2143 * the file does not exist, is not a symbolic link, or it cannot
2144 * be determined if the file is a symbolic link or not.
2148 * installed, its {@link SecurityManager#checkRead(String) checkRead}
2165 * are handled for the case that the file is a symbolic link. By default,
2167 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
2172 * read with the {@link #readAttributes(Path,Class,LinkOption[])
2173 * readAttributes} method and the file type tested with the {@link
2187 * installed, its {@link SecurityManager#checkRead(String) checkRead}
2202 * are handled for the case that the file is a symbolic link. By default,
2204 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
2209 * read with the {@link #readAttributes(Path,Class,LinkOption[])
2210 * readAttributes} method and the file type tested with the {@link
2224 * installed, its {@link SecurityManager#checkRead(String) checkRead}
2239 * are handled for the case that the file is a symbolic link. By default,
2241 * of the link is read. If the option {@link LinkOption#NOFOLLOW_LINKS
2258 * installed, its {@link SecurityManager#checkRead(String) checkRead}
2296 * In the case of the default provider, the security manager's {@link
2313 * files, or other reasons. The size of files that are not {@link
2326 * installed, its {@link SecurityManager#checkRead(String) checkRead}
2358 * are handled for the case that the file is a symbolic link. By default,
2359 * symbolic links are followed. If the option {@link LinkOption#NOFOLLOW_LINKS
2376 * In the case of the default provider, the {@link
2406 * are handled for the case that the file is a symbolic link. By default,
2407 * symbolic links are followed. If the option {@link LinkOption#NOFOLLOW_LINKS
2410 * <p> Note that this method is not the complement of the {@link #exists
2427 * In the case of the default provider, the {@link
2486 * installed, the {@link SecurityManager#checkRead(String) checkRead}
2517 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
2526 * and that this Java virtual machine has appropriate privileges to {@link
2552 * installed, the {@link SecurityManager#checkExec(String)
2565 * file tree traversal is <em>depth-first</em> with the given {@link
2568 * visit method returns a result of {@link FileVisitResult#TERMINATE
2573 * <p> For each file encountered this method attempts to read its {@link
2575 * directory then the {@link FileVisitor#visitFile visitFile} method is
2577 * due to an I/O exception, then the {@link FileVisitor#visitFileFailed
2588 * directory, then the directory is closed and the visitor's {@link
2594 * method. If the {@code options} parameter contains the {@link
2598 * of the link. If they can be read then the {@code visitFile} method is
2599 * invoked with the attributes of the link (otherwise the {@code visitFileFailed}
2602 * <p> If the {@code options} parameter contains the {@link
2606 * directory. Cycle detection is done by recording the {@link
2608 * or if file keys are not available, by invoking the {@link #isSameFile
2611 * {@link FileVisitor#visitFileFailed visitFileFailed} method is invoked with
2612 * an instance of {@link FileSystemLoopException}.
2617 * {@link Integer#MAX_VALUE MAX_VALUE} may be used to indicate that all
2645 * In the case of the default provider, the {@link
2733 * In the case of the default provider, the {@link
2775 * installed, the {@link SecurityManager#checkRead(String) checkRead}
2791 * characters using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset
2810 * installed, the {@link SecurityManager#checkRead(String) checkRead}
2823 * opened. If no options are present then this method works as if the {@link
2824 * StandardOpenOption#CREATE CREATE}, {@link
2825 * StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link
2828 * initially truncating an existing {@link #isRegularFile regular-file} to
2850 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
2867 * into bytes for writing using the {@link StandardCharsets#UTF_8 UTF-8}
2868 * {@link Charset charset}.
2890 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
2920 * symbolic link. If the {@link StandardCopyOption#REPLACE_EXISTING
2923 * file exists and is a symbolic link, then the symbolic link is replaced.
2974 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
2977 * manager's {@link SecurityManager#checkDelete(String) checkDelete}
3046 * <p> Note that if the given output stream is {@link java.io.Flushable}
3047 * then its {@link java.io.Flushable#flush flush} method may need to invoked
3061 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3148 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3196 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3216 * using the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
3236 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3248 * works as if the {@link StandardOpenOption#CREATE CREATE}, {@link
3249 * StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link
3252 * initially truncating an existing {@link #isRegularFile regular-file} to
3283 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
3313 * {@link StandardOpenOption#CREATE CREATE}, {@link
3314 * StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING}, and {@link
3317 * initially truncating an existing {@link #isRegularFile regular-file} to
3341 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
3363 * the {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
3387 * installed, the {@link SecurityManager#checkWrite(String) checkWrite}
3406 * <p> The elements of the stream are {@link Path} objects that are
3407 * obtained as if by {@link Path#resolve(Path) resolving} the name of the
3417 * <p> The returned stream encapsulates a {@link DirectoryStream}.
3420 * stream's {@link Stream#close close} method is invoked after the stream
3427 * <p> If an {@link IOException} is thrown when accessing the directory
3428 * after this method has returned, it is wrapped in an {@link
3444 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3493 * are {@link Path} objects that are obtained as if by {@link
3499 * attempts to read its {@link BasicFileAttributes}. If the file is a
3511 * method. If the {@code options} parameter contains the {@link
3515 * of the link.
3517 * <p> If the {@code options} parameter contains the {@link
3521 * directory. Cycle detection is done by recording the {@link
3523 * or if file keys are not available, by invoking the {@link #isSameFile
3526 * an instance of {@link FileSystemLoopException}.
3531 * {@link Integer#MAX_VALUE MAX_VALUE} may be used to indicate that all
3537 * <p> The returned stream encapsulates one or more {@link DirectoryStream}s.
3540 * stream's {@link Stream#close close} method is invoked after the stream
3542 * {@link java.lang.IllegalStateException}.
3544 * <p> If an {@link IOException} is thrown when accessing the directory
3545 * after this method has returned, it is wrapped in an {@link
3556 * @return the {@link Stream} of {@link Path}
3562 * In the case of the default provider, the {@link
3589 * are {@link Path} objects that are obtained as if by {@link
3599 * <p> The returned stream encapsulates one or more {@link DirectoryStream}s.
3602 * stream's {@link Stream#close close} method is invoked after the stream
3604 * {@link java.lang.IllegalStateException}.
3611 * @return the {@link Stream} of {@link Path}
3615 * In the case of the default provider, the {@link
3634 * the {@link #walk walk} method. For each file encountered, the given
3635 * {@link BiPredicate} is invoked with its {@link Path} and {@link
3637 * {@link Path#resolve(Path) resolving} the relative path against {@code
3638 * start} and is only included in the returned {@link Stream} if
3639 * the {@code BiPredicate} returns true. Compare to calling {@link
3644 * <p> The returned stream encapsulates one or more {@link DirectoryStream}s.
3647 * stream's {@link Stream#close close} method is invoked after the stream
3649 * {@link java.lang.IllegalStateException}.
3651 * <p> If an {@link IOException} is thrown when accessing the directory
3652 * after returned from this method, it is wrapped in an {@link
3666 * @return the {@link Stream} of {@link Path}
3672 * In the case of the default provider, the {@link
3700 * Read all lines from a file as a {@code Stream}. Unlike {@link
3711 * sequence is read, is wrapped in an {@link UncheckedIOException} that will
3713 * {@link java.util.stream.Stream} method that caused the read to take
3717 * <p> The returned stream encapsulates a {@link Reader}. If timely
3720 * {@link Stream#close close} method is invoked after the stream operations
3735 * installed, the {@link SecurityManager#checkRead(String) checkRead}
3761 * decoded into characters using the {@link StandardCharsets#UTF_8 UTF-8}
3762 * {@link Charset charset}.
3779 * installed, the {@link SecurityManager#checkRead(String) checkRead}