ambrevar/shell: Add move-file.
parent
60131c414b
commit
2f6df66930
|
@ -243,3 +243,13 @@ If PARENT-DIRECTORY is not a parent of PATH, return PATH."
|
|||
(if (eq *readtable* (named-readtables:find-readtable :interpol-syntax))
|
||||
(named-readtables:in-readtable :standard)
|
||||
(named-readtables:in-readtable :interpol-syntax)))
|
||||
|
||||
(export-always 'move-file)
|
||||
(defun move-file (source destination)
|
||||
"`rename-file' does not work cross-device, in particular it does not work on
|
||||
different Btrfs subvolumes."
|
||||
(uiop:run-program (list "mv"
|
||||
;; Use native-namestring in case path contains escaped
|
||||
;; character, like "\\[".
|
||||
(uiop:native-namestring source)
|
||||
(uiop:native-namestring destination))))
|
||||
|
|
Loading…
Reference in New Issue