Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
copy-directory
(defun copy-directory (from to &key overwrite)
(let ((len (length (namestring (truename from)))))
(cl-fad:walk-directory
from
(lambda (x)
(cl-fad:copy-file
x
(ensure-directories-exist
(merge-pathnames
(subseq (namestring x) len)
to)) :overwrite overwrite)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.