code: public static boolean cleanDirectory(File dir) {
          if (dir.isDirectory()) {
              String[] children = dir.list();
              if (children != null) {
                  for (String aChildren : children) {
                      boolean success = cleanDirectory(new File(dir, aChildren));
                      if (!success) {
                          return false;
                      }
                  }
              }
          }
          return dir.delete();
      }
docs: 递归删除目录下的所有文件及子目录下所有文件
  
  @param dir 文件夹
  @return 是否删除完成