code: public static boolean createFolder(File targetFolder) {
          if (targetFolder.exists()) {
              if (targetFolder.isDirectory()) return true;
              //noinspection ResultOfMethodCallIgnored
              targetFolder.delete();
          }
          return targetFolder.mkdirs();
      }
docs: Create a folder, If the folder exists is not created.
  
  @param targetFolder folder path.
  
  @return True: success, or false: failure.