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 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.
Giving an Agent an Inbox Without Giving It Your Mailbox
A dedicated email address limits which messages reach an agent; the harder details are untrusted content, sending authority and missing attachments.
Your Webhook Returned 200. Did the Work Happen?
Tracing a WHOOP event through receipt, diagnostic capture, Sheets forwarding and reconciliation reveals what a successful response leaves unproved.