diff --git a/scheme/lib/ftp.scm b/scheme/lib/ftp.scm index a46da0c..a199c4c 100644 --- a/scheme/lib/ftp.scm +++ b/scheme/lib/ftp.scm @@ -145,28 +145,30 @@ (let ((ttype (cond ((eq? type (ftp-type binary)) "I") ((eq? type (ftp-type ascii)) "A")))) - (ftp-send-command connection (build-command "TYPE" ttype)))) + (ftp-send-command connection (build-command "TYPE" ttype)) + (values))) -;;: connection x string x string -> status (define (ftp-rename connection oldname newname) (ftp-send-command connection (build-command "RNFR " oldname) (code-with-prefix "35")) (ftp-send-command connection (build-command "RNTO" newname) - (code-with-prefix "25"))) + (code-with-prefix "25")) + (values)) -;;: connection x string -> status (define (ftp-delete connection file) (ftp-send-command connection (build-command "DELE" file) - (code-with-prefix "25"))) + (code-with-prefix "25")) + (values)) ;;: connection x string -> status (define (ftp-cd connection dir) - (ftp-send-command connection (build-command "CWD" dir))) + (ftp-send-command connection (build-command "CWD" dir)) + (values)) ;;: connection -> status (define (ftp-cdup connection) - (ftp-send-command connection "CDUP" (exactly-code "250"))) - + (ftp-send-command connection "CDUP" (exactly-code "250")) + (values)) ;;: on success return the new directory as a string (define (ftp-pwd connection) @@ -178,18 +180,18 @@ => (lambda (match) (match:substring match 1)))))) -;;: connection x string -> status (define (ftp-rmdir connection dir) - (ftp-send-command connection (build-command "RMD " dir))) + (ftp-send-command connection (build-command "RMD " dir)) + (values)) -;;: connection x string -> status (define (ftp-mkdir connection dir) - (ftp-send-command connection (build-command "MKD ~a" dir))) + (ftp-send-command connection (build-command "MKD ~a" dir)) + (values)) ;; On success return a Scsh date record. This message is not part of ;; rfc959 but seems to be supported by many ftp servers (it's useful ;; for mirroring) -;;: connection x string -> date + (define (ftp-modification-time connection file) (let* ((reply (ftp-send-command connection (build-command "MDTM" file))) @@ -217,11 +219,11 @@ ;; Abort the current data transfer. Maybe we should close the data ;; socket? -;;: connection -> status -(define (ftp-abort connection) - (ftp-send-command connection "ABOR")) -;;: connection -> status +(define (ftp-abort connection) + (ftp-send-command connection "ABOR") + (values)) + (define (ftp-quit connection) (ftp-send-command connection "QUIT" (exactly-code "221")) (close-socket (ftp-connection-command-socket connection))) @@ -243,8 +245,6 @@ ;; during the entire conversation with the server). ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;: connection [ x string ] -> status - (define (ftp-ls connection . maybe-dir) (with-data-connection connection @@ -261,7 +261,6 @@ => (lambda (match) (match:substring match 0))))) -;;: connection [ x string ] -> status (define (ftp-dir connection . maybe-dir) (with-data-connection connection @@ -315,11 +314,10 @@ ;; send a command verbatim to the remote server and wait for a ;; reply. -;;: connection x string -> status + (define (ftp-quot connection cmd) (ftp-send-command connection cmd)) - ;; ------------------------------------------------------------------------ ;; no exported procedures below