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.
MODIFY
src/main/java/org/apache/commons/io/file/PathUtils.java
src/main/java/org/apache/commons/io/file/PathUtils.java
@@ -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);
}

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.