(in-package #:lolisp) (defmacro str (&rest strs) `(concatenate 'string ,@strs)) (defun copy-stream (from to &key (buffer-size 4096) &aux (buffer (make-array buffer-size :element-type '(unsigned-byte 8)))) (loop for bytes-read = (read-sequence buffer from) while (plusp bytes-read) do (write-sequence buffer to :end bytes-read))) (defun real-copy-file (from to) (with-open-file (from from :direction :input :element-type '(unsigned-byte 8)) (with-open-file (to to :direction :output :if-exists :supersede :element-type '(unsigned-byte 8)) (copy-stream from to)))) (defun real-move-file (from to) (real-copy-file from to) (delete-file from))