Lines Matching refs:options

79      * <p> The {@code options} parameter determines how the file is opened.
80 * If no options are present then it is equivalent to opening the file with
83 * specific options.
87 * @param options
88 * options specifying how the file is opened
93 * if an invalid combination of options is specified
103 public static InputStream newInputStream(Path path, OpenOption... options)
106 return provider(path).newInputStream(path, options);
120 * option may not be present in the array of options. If no options are
123 * and {@link StandardOpenOption#WRITE WRITE} options are present. In other
148 * @param options
149 * options specifying how the file is opened
154 * if {@code options} contains an invalid combination of options
167 public static OutputStream newOutputStream(Path path, OpenOption... options)
170 return provider(path).newOutputStream(path, options);
177 * <p> The {@code options} parameter determines how the file is opened.
179 * StandardOpenOption#WRITE WRITE} options determine if the file should be
186 * options may be present:
198 * with the {@code READ} or {@code TRUNCATE_EXISTING} options. </td>
252 * options.
278 * @param options
279 * options specifying how the file is opened
287 * if the set contains an invalid combination of options
311 Set<? extends OpenOption> options,
315 return provider(path).newByteChannel(path, options, attrs);
328 * @param options
329 * options specifying how the file is opened
334 * if the set contains an invalid combination of options
356 public static SeekableByteChannel newByteChannel(Path path, OpenOption... options)
359 Set<OpenOption> set = new HashSet<OpenOption>(options.length);
360 Collections.addAll(set, options);
584 EnumSet<StandardOpenOption> options =
586 newByteChannel(path, options, attrs).close();
1125 * options} parameter specifying how the copy is performed. By default, the
1137 * <p> The {@code options} parameter may include any of the following:
1169 * implementation specific options.
1193 * @param options
1194 * options specifying how the copy should be done
1219 public static Path copy(Path source, Path target, CopyOption... options)
1225 provider.copy(source, target, options);
1228 CopyMoveHelper.copyToForeignTarget(source, target, options);
1255 * <p> The {@code options} parameter may include any of the following:
1269 * other options are ignored. If the target file exists then it is
1280 * implementation specific options.
1313 * @param options
1314 * options specifying how the move should be done
1329 * if the options array contains the {@code ATOMIC_MOVE} option but
1339 public static Path move(Path source, Path target, CopyOption... options)
1345 provider.move(source, target, options);
1348 CopyMoveHelper.moveToForeignTarget(source, target, options);
1591 * <p> The {@code options} array may be used to indicate how symbolic links
1614 * @param options
1615 * options indicating how symbolic links are handled
1622 LinkOption... options)
1624 return provider(path).getFileAttributeView(path, type, options);
1637 * <p> The {@code options} array may be used to indicate how symbolic links
1663 * @param options
1664 * options indicating how symbolic links are handled
1681 LinkOption... options)
1684 return provider(path).readAttributes(path, type, options);
1705 * <p> The {@code options} array may be used to indicate how symbolic links
1724 * @param options
1725 * options indicating how symbolic links are handled
1749 LinkOption... options)
1752 provider(path).setAttribute(path, attribute, value, options);
1773 * <p> The {@code options} array may be used to indicate how symbolic links
1791 * @param options
1792 * options indicating how symbolic links are handled
1810 LinkOption... options)
1816 Map<String,Object> map = readAttributes(path, attribute, options);
1877 * <p> The {@code options} array may be used to indicate how symbolic links
1887 * @param options
1888 * options indicating how symbolic links are handled
1908 LinkOption... options)
1911 return provider(path).readAttributes(path, attributes, options);
1923 * <p> The {@code options} array may be used to indicate how symbolic links
1931 * @param options
1932 * options indicating how symbolic links are handled
1948 LinkOption... options)
1951 return readAttributes(path, PosixFileAttributes.class, options).permissions();
2003 * @param options
2004 * options indicating how symbolic links are handled
2019 public static UserPrincipal getOwner(Path path, LinkOption... options) throws IOException {
2021 getFileAttributeView(path, FileOwnerAttributeView.class, options);
2105 * <p> The {@code options} array may be used to indicate how symbolic links
2119 * @param options
2120 * options indicating how symbolic links are handled
2131 public static boolean isDirectory(Path path, LinkOption... options) {
2133 return readAttributes(path, BasicFileAttributes.class, options).isDirectory();
2142 * <p> The {@code options} array may be used to indicate how symbolic links
2156 * @param options
2157 * options indicating how symbolic links are handled
2168 public static boolean isRegularFile(Path path, LinkOption... options) {
2170 return readAttributes(path, BasicFileAttributes.class, options).isRegularFile();
2179 * <p> The {@code options} array may be used to indicate how symbolic links
2187 * @param options
2188 * options indicating how symbolic links are handled
2204 public static FileTime getLastModifiedTime(Path path, LinkOption... options)
2207 return readAttributes(path, BasicFileAttributes.class, options).lastModifiedTime();
2281 private static boolean followLinks(LinkOption... options) {
2283 for (LinkOption opt: options) {
2298 * <p> The {@code options} parameter may be used to indicate how symbolic links
2310 * @param options
2311 * options indicating how symbolic links are handled
2323 public static boolean exists(Path path, LinkOption... options) {
2325 if (followLinks(options)) {
2346 * <p> The {@code options} parameter may be used to indicate how symbolic links
2361 * @param options
2362 * options indicating how symbolic links are handled
2372 public static boolean notExists(Path path, LinkOption... options) {
2374 if (followLinks(options)) {
2535 * method. If the {@code options} parameter contains the {@link
2543 * <p> If the {@code options} parameter contains the {@link
2573 * @param options
2574 * options to configure the traversal
2593 Set<FileVisitOption> options,
2600 new FileTreeWalker(options, visitor, maxDepth).walk(start);
2682 * The {@code options} parameter specifies how the the file is created or
2683 * opened. If no options are present then this method works as if the {@link
2686 * StandardOpenOption#WRITE WRITE} options are present. In other words, it
2698 * @param options
2699 * options specifying how the file is opened
2716 OpenOption... options)
2720 Writer writer = new OutputStreamWriter(newOutputStream(path, options), encoder);
2750 * required to be supported by this method. Additional options may be
2780 * @param options
2781 * options specifying how the copy should be done
2796 * if {@code options} contains a copy option that is not supported
2805 public static long copy(InputStream in, Path target, CopyOption... options)
2813 for (CopyOption opt: options) {
2818 throw new NullPointerException("options contains 'null'");
3021 * Writes bytes to a file. The {@code options} parameter specifies how the
3022 * the file is created or opened. If no options are present then this method
3025 * StandardOpenOption#WRITE WRITE} options are present. In other words, it
3047 * @param options
3048 * options specifying how the file is opened
3061 public static Path write(Path path, byte[] bytes, OpenOption... options)
3067 try (OutputStream out = Files.newOutputStream(path, options)) {
3086 * <p> The {@code options} parameter specifies how the the file is created
3087 * or opened. If no options are present then this method works as if the
3090 * StandardOpenOption#WRITE WRITE} options are present. In other words, it
3104 * @param options
3105 * options specifying how the file is opened
3120 Charset cs, OpenOption... options)
3126 OutputStream out = newOutputStream(path, options);