Java Snippet - Recursive Directory Deletion
Returns true on success, false on failure: ```java
public static boolean deleteDir(File dir) { if (dir.isDirectory()) { String[] children = dir.list(); for (int i=0; i<children.length; i++) { boolean success = deleteDir(new File(dir, children[i])); if (!success) { return false; } } } return dir.delete(); }
$ subscribe --newsletter
Practical AI engineering, in your inbox
Field notes for technical leaders building agents, evaluation systems, governance, and production infrastructure.
Related
What Belongs in Agent Memory
A durable handoff separates observations, hypotheses and unfinished work, then records what would make each observation stale.
What Happened After the $8 Website Rebuild
The $7.99 rebuild bought a first version; the repository now shows the less photogenic work of preserving an archive and keeping its promises.
What I Need Before I Approve an Agent’s Work
A review bundle should connect the requirement to evidence for the exact candidate and make the remaining decision explicit.