(defn delete-file-recursive [& paths]
(when-not (empty? paths)
(let [f #^File (first paths)]
(if (and f (.exists f))
(if (.isDirectory f)
(if-let [files (seq (.listFiles f))]
(recur (concat files paths))
(do
(.delete f)
(recur (rest paths))))
(do
(.delete f)
(recur (rest paths))))
(recur (rest paths))))))
Comments top
No comments for delete-file-recursive. Log in to add a comment.