diff options
Diffstat (limited to 'src/connection.lisp')
-rw-r--r-- | src/connection.lisp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/connection.lisp b/src/connection.lisp index b993761..56f2985 100644 --- a/src/connection.lisp +++ b/src/connection.lisp @@ -327,6 +327,17 @@ start with RUN." (defun test (&rest args) (zerop (apply #'mrun :for-exit "test" args))) +(defun delete-remote-tree (&rest paths) + "Recursively delete each of PATHS." + (mrun "rm" "-rf" paths)) + +(defun remote-exists-p (&rest paths) + "Does each of PATHS exists? +PATH may be any kind of file, including directories." + (test (loop for path on paths + nconc (list "-e" (car path)) + when (cdr path) collect "-a"))) + (defun readfile (&rest args) (apply #'connection-readfile *connection* args)) |