- 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))))
|
connection))))
|
||||||
(exactly-code "230")))))))
|
(exactly-code "230")))))))
|
||||||
|
|
||||||
;; Type must be one of 'binary or 'text or 'ascii, or a string which will be
|
(define-enumerated-type ftp-type :ftp-type
|
||||||
;; sent verbatim
|
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
|
(let ((ttype (cond
|
||||||
((string? type) type)
|
((eq? type (ftp-type binary)) "I")
|
||||||
((eq? type 'binary) "I")
|
((eq? type (ftp-type ascii)) "A"))))
|
||||||
((or (eq? type 'ascii)
|
|
||||||
(eq? type 'text)) "A")
|
|
||||||
(else
|
|
||||||
(call-error "type must be one of 'binary or 'text or 'ascii"
|
|
||||||
ftp-type type)))))
|
|
||||||
(ftp-send-command connection (build-command "TYPE" ttype))))
|
(ftp-send-command connection (build-command "TYPE" ttype))))
|
||||||
|
|
||||||
;;: connection x string x string -> status
|
;;: connection x string x string -> status
|
||||||
|
|
|
@ -90,7 +90,8 @@
|
||||||
|
|
||||||
(define-interface ftp-interface
|
(define-interface ftp-interface
|
||||||
(export ftp-connect
|
(export ftp-connect
|
||||||
ftp-type
|
(ftp-type :syntax)
|
||||||
|
ftp-set-type!
|
||||||
ftp-rename
|
ftp-rename
|
||||||
ftp-delete
|
ftp-delete
|
||||||
ftp-cd
|
ftp-cd
|
||||||
|
@ -414,6 +415,7 @@
|
||||||
(open scheme-with-scsh
|
(open scheme-with-scsh
|
||||||
netrc
|
netrc
|
||||||
define-record-types
|
define-record-types
|
||||||
|
finite-types
|
||||||
receiving
|
receiving
|
||||||
handle
|
handle
|
||||||
conditions
|
conditions
|
||||||
|
|
Loading…
Reference in New Issue