public static final boolean createFileParentDir(String filePath){
  File file=new File(filePath);
  if (file != null) {
    if (file.exists()) {
      return true;
    }
 else {
      File parentFile=file.getParentFile();
      if (parentFile != null) {
        if (parentFile.exists()) {
          return true;
        }
 else {
          return parentFile.mkdirs();
        }
      }
    }
  }
  return false;
}

public static final boolean createFileParentDir ( String filePath ) { File file = new File ( filePath ) ; if ( file != null ) { if ( file . exists ( ) ) { return true ; } else { File parentFile = file . getParentFile ( ) ; if ( parentFile != null ) { if ( parentFile . exists ( ) ) { return true ; } else { return parentFile . mkdirs ( ) ; } } } } return false ; }
create parent dir by file path
