code: public static boolean delete(File file) {
          boolean result = false;
          if (file.exists()) {
              result = file.delete();
              if (!result) {
                  logger.info("delete " + file.getName() + " error");
              }
          }
          return result;
      }
docs: delete file
  @param file