private boolean deleteFiles(File parent) {

		File[] f = parent.listFiles();
		for (File element : f) {
			if (element.isDirectory()) {
				if (!deleteFiles(element)) {
					return false;
				}
				element.delete();
			}
			else if (!element.delete()) {
				return false;
			}
		}
		return true;
	}
Recursive method to delete files in the given parent directory.
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/server/RepositoryManagerTest.java