Lines Matching defs:dir
383 * name of the directory entry against {@code dir}.
393 * @param dir
408 public static DirectoryStream<Path> newDirectoryStream(Path dir)
411 return provider(dir).newDirectoryStream(dir, AcceptAllFilter.FILTER);
420 * name of the directory entry against {@code dir}. The entries returned by
427 * Path dir = ...
428 * try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.java")) {
444 * @param dir
463 public static DirectoryStream<Path> newDirectoryStream(Path dir, String glob)
468 return newDirectoryStream(dir);
471 FileSystem fs = dir.getFileSystem();
479 return fs.provider().newDirectoryStream(dir, filter);
488 * name of the directory entry against {@code dir}. The entries returned by
516 * Path dir = ...
517 * try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, filter)) {
522 * @param dir
539 public static DirectoryStream<Path> newDirectoryStream(Path dir,
543 return provider(dir).newDirectoryStream(dir, filter);
604 * @param dir
625 public static Path createDirectory(Path dir, FileAttribute<?>... attrs)
628 provider(dir).createDirectory(dir, attrs);
629 return dir;
647 * @param dir
660 * if {@code dir} exists but is not a directory <i>(optional specific
670 * dir} is not an absolute path then its {@link Path#toAbsolutePath
674 * method to check access to the system property {@code user.dir}
676 public static Path createDirectories(Path dir, FileAttribute<?>... attrs)
681 createAndCheckIsDirectory(dir, attrs);
682 return dir;
691 dir = dir.toAbsolutePath();
697 Path parent = dir.getParent();
716 for (Path name: parent.relativize(dir)) {
720 return dir;
727 private static void createAndCheckIsDirectory(Path dir,
732 createDirectory(dir, attrs);
734 if (!isDirectory(dir, LinkOption.NOFOLLOW_LINKS))
769 * @param dir
791 * if an I/O error occurs or {@code dir} does not exist
797 public static Path createTempFile(Path dir,
803 return TempFileHelper.createTempFile(Objects.requireNonNull(dir),
814 * the case that the {@code dir} parameter is the temporary-file directory.
871 * @param dir
889 * if an I/O error occurs or {@code dir} does not exist
896 public static Path createTempDirectory(Path dir,
901 return TempFileHelper.createTempDirectory(Objects.requireNonNull(dir),
912 * that the {@code dir} parameter is the temporary-file directory.