dotfiles/sbcl/.quicklisp/dists/quicklisp/software/cl-project-20190521-git/src/io.lisp
2020-02-24 20:27:04 -05:00

17 lines
576 B
Common Lisp

(in-package :cl-user)
(defpackage cl-project.io
(:use #:cl
#:cl-project.specials)
(:import-from #:cl-emb
#:execute-emb)
(:export #:copy-file-to-file))
(in-package :cl-project.io)
(defun copy-file-to-file (source-path target-path)
"Copy a file `source-path` to the `target-path`."
(format t "~&writing ~A~%" target-path)
(ensure-directories-exist target-path)
(with-open-file (stream target-path :direction :output :if-exists :supersede)
(write-sequence
(cl-emb:execute-emb source-path :env *skeleton-parameters*)
stream)))