code: public static File mkdirs(File dir) throws IOException {
          try {
              return Files.createDirectories(fileToPath(dir)).toFile();
          } catch (UnsupportedOperationException e) {
              throw new IOException(e);
          }
      }
docs: Ensures that the given directory exists (if not, it's created, including all the parent directories.)
  
  @return
  This method returns the 'dir' parameter so that the method call flows better.