code: public static void delete(String path) throws IOException {
      if (!Files.deleteIfExists(Paths.get(path))) {
        throw new IOException("Failed to delete " + path);
      }
    }
docs: Deletes the file or directory.
  
  @param path pathname string of file or directory