Delete file f. If it's a directory, recursively delete all its contents.
Raise an exception if any deletion fails unless silently is true.
(defn delete-file-recursively
"Delete file f. If it's a directory, recursively delete all its contents.
Raise an exception if any deletion fails unless silently is true."
{:deprecated "1.2"}
[f & [silently]]
(let [f (file f)]
(if (.isDirectory f)
(doseq [child (.listFiles f)]
(delete-file-recursively child silently)))
(delete-file f silently)))
Comments top
No comments for delete-file-recursively. Log in to add a comment.