- rename FTP-TYPE -> FTP-SET-TYPE!
- use enumerated type for argument of FTP-SET-TYPE!
This commit is contained in:
parent
d54645f39b
commit
bba9c34744
|
@ -146,18 +146,17 @@
|
|||
connection))))
|
||||
(exactly-code "230")))))))
|
||||
|
||||
;; Type must be one of 'binary or 'text or 'ascii, or a string which will be
|
||||
;; sent verbatim
|
||||
(define-enumerated-type ftp-type :ftp-type
|
||||
ftp-type?
|
||||
ftp-types
|
||||
ftp-type-name
|
||||
ftp-type-index
|
||||
(binary ascii))
|
||||
|
||||
(define (ftp-type connection type)
|
||||
(define (ftp-set-type! connection type)
|
||||
(let ((ttype (cond
|
||||
((string? type) type)
|
||||
((eq? type 'binary) "I")
|
||||
((or (eq? type 'ascii)
|
||||
(eq? type 'text)) "A")
|
||||
(else
|
||||
(call-error "type must be one of 'binary or 'text or 'ascii"
|
||||
ftp-type type)))))
|
||||
((eq? type (ftp-type binary)) "I")
|
||||
((eq? type (ftp-type ascii)) "A"))))
|
||||
(ftp-send-command connection (build-command "TYPE" ttype))))
|
||||
|
||||
;;: connection x string x string -> status
|
||||
|
|
|
@ -90,7 +90,8 @@
|
|||
|
||||
(define-interface ftp-interface
|
||||
(export ftp-connect
|
||||
ftp-type
|
||||
(ftp-type :syntax)
|
||||
ftp-set-type!
|
||||
ftp-rename
|
||||
ftp-delete
|
||||
ftp-cd
|
||||
|
@ -414,6 +415,7 @@
|
|||
(open scheme-with-scsh
|
||||
netrc
|
||||
define-record-types
|
||||
finite-types
|
||||
receiving
|
||||
handle
|
||||
conditions
|
||||
|
|
Loading…
Reference in New Issue