1.2.0 permalink Arrow_down_16x16

empty-directory

leiningen.clean

  • (empty-directory f & [silently])
Recursively delete all the files in f, but not f itself.
Raise an exception if any deletion fails unless silently is true.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source leiningen/clean.clj:5 top

(defn empty-directory
  "Recursively delete all the files in f, but not f itself.
Raise an exception if any deletion fails unless silently is true."
  [f & [silently]]
  (let [f (file f)]
    (when (.isDirectory f)
      (doseq [child (.listFiles f)]
        (delete-file-recursively child silently)))))
Vars in leiningen.clean/empty-directory: defn doseq let when
Used in 0 other vars

Comments top

No comments for empty-directory. Log in to add a comment.