aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2001-10-12 19:16:34 +0000
committerSam Steingold2001-10-12 19:16:34 +0000
commitb878b8c30ad954e9ffa7b58064cb4fe7ccecc2df (patch)
tree34ab817517a77edc8776be8a4cb6639bb7e663a7
parent77558f0a7259df9673923f19a74a0e930550d5f8 (diff)
downloademacs-b878b8c30ad954e9ffa7b58064cb4fe7ccecc2df.tar.gz
emacs-b878b8c30ad954e9ffa7b58064cb4fe7ccecc2df.zip
(ange-ftp-copy-files-async): New function for
asynchronous multiple file copying.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/ange-ftp.el26
2 files changed, 31 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1652e93c62e..60b666358cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12001-10-12 Sam Steingold <sds@gnu.org>
2
3 * net/ange-ftp.el (ange-ftp-copy-files-async): New function for
4 asynchronous multiple file copying.
5
12001-10-12 Gerd Moellmann <gerd@gnu.org> 62001-10-12 Gerd Moellmann <gerd@gnu.org>
2 7
3 * emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): New 8 * emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): New
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index b167879db1e..1afc11306fa 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -3712,6 +3712,32 @@ Value is (0 0) if the modification time cannot be determined."
3712 nil 3712 nil
3713 nil 3713 nil
3714 (interactive-p))) 3714 (interactive-p)))
3715
3716(defun ange-ftp-copy-files-async (okay-p line verbose-p files)
3717 "Copy some files in the background.
3718Arguments: (OKAY-P LINE VERBOSE-P FILES)
3719OKAY-P must be T, and LINE does not matter. They are here to make this
3720 function a valid CONT argument for `ange-ftp-raw-send-cmd'.
3721If VERBOSE-P is non-nil, print progress report in the echo area.
3722 When all the files have been copied already, a message is shown anyway.
3723FILES is a list of files to copy in the form
3724 (from-file to-file ok-if-already-exists keep-date)
3725E.g.,
3726 (ange-ftp-copy-files-async t nil t '((\"a\" \"b\" t t) (\"c\" \"d\" t t)))"
3727 (unless okay-p (error "%s: %s" 'ange-ftp-copy-files-async line))
3728 (if files
3729 (let* ((ff (car files))
3730 (from-file (nth 0 ff))
3731 (to-file (nth 1 ff))
3732 (ok-if-exists (nth 2 ff))
3733 (keep-date (nth 3 ff)))
3734 (ange-ftp-copy-file-internal
3735 from-file to-file ok-if-exists keep-date
3736 (and verbose-p (format "%s --> %s" from-file to-file))
3737 (list 'ange-ftp-copy-files-async verbose-p (cdr files))
3738 t))
3739 (message "%s: done" 'ange-ftp-copy-files-async)))
3740
3715 3741
3716;;;; ------------------------------------------------------------ 3742;;;; ------------------------------------------------------------
3717;;;; File renaming support. 3743;;;; File renaming support.