]> gitweb.factorcode.org Git - factor.git/blob - basis/ftp/ftp.factor
interpolate: split out format into a hook
[factor.git] / basis / ftp / ftp.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors io io.crlf kernel sequences ;
4 IN: ftp
5
6 SYMBOLS: +active+ +passive+ ;
7
8 TUPLE: ftp-response n strings parsed ;
9
10 : <ftp-response> ( -- ftp-response )
11     ftp-response new
12         V{ } clone >>strings ;
13
14 : add-response-line ( ftp-response string -- ftp-response )
15     over strings>> push ;
16
17 : ftp-send ( string -- ) write crlf flush ;