I tried this: (progn (funcall 'require "syscalls") (let ((copy-file (find-symbol* :copy-file :posix))) (apply copy-file source target :method :rename (when (member :if-exists (sys::arglist copy-file)) '(:if-exists :overwrite)))))
But I get massive errors of this kind: EVAL/APPLY: Too many arguments (4 instead of at most 2) given to RENAME-FILE
I tried this:
(when (member :if-exists (sys::arglist copy-file)) '(:if-exists :overwrite)))))
(progn
(funcall 'require "syscalls")
(let ((copy-file (find-symbol* :copy-file :posix)))
(apply copy-file source target :method :rename
But I get massive errors of this kind:
EVAL/APPLY: Too many arguments (4 instead of at most 2) given to RENAME-FILE