No need to check if the directory already exists.
Files.createDirectories() Javadoc states that an exception is not thrown
if the directory could not be created because it already exists.
@@ -308,9 +308,6 @@ public static Path createParentDirectories(final Path path, final FileAttribute<
if (parent == null) {
return null;
}
- if (Files.isDirectory(parent)) {
- return parent;
- }
return Files.createDirectories(parent, attrs);
}
