factor/basis/ftp/ftp.factor

19 lines
495 B
Factor
Raw Normal View History

2008-05-12 20:31:56 -04:00
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
2008-05-14 08:54:13 -04:00
USING: accessors arrays assocs combinators io io.files kernel
math.parser sequences strings ;
2008-05-12 20:31:56 -04:00
IN: ftp
SYMBOLS: +active+ +passive+ ;
2008-05-12 20:31:56 -04:00
2008-05-13 17:26:11 -04:00
TUPLE: ftp-response n strings parsed ;
: <ftp-response> ( -- ftp-response )
ftp-response new
V{ } clone >>strings ;
: add-response-line ( ftp-response string -- ftp-response )
over strings>> push ;
2008-05-12 20:31:56 -04:00
: ftp-send ( string -- ) write "\r\n" write flush ;