private void deleteContents(File path) { if (path.exists()) { for (File file : path.listFiles()) { if (file.isDirectory()) { deleteContents(file); } else { attemptToDelete(file); } } } }
public void deleteRepo() { deleteContents(repoDir); }