code: public static boolean delFileOrFolder(File file) {
          if (file == null || !file.exists()) {
              // do nothing
          } else if (file.isFile()) {
              file.delete();
          } else if (file.isDirectory()) {
              File[] files = file.listFiles();
              if (files != null) {
                  for (File sonFile : files) {
                      delFileOrFolder(sonFile);
                  }
              }
              file.delete();
          }
          return true;
      }
docs: Delete file or folder.
  
  @param file file.
  
  @return is succeed.
  
  @see #delFileOrFolder(String)