| 
									
										
										
										
											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 | 
					
						
							| 
									
										
										
										
											2008-11-14 03:56:12 -05:00
										 |  |  | math.parser sequences strings ;
 | 
					
						
							| 
									
										
										
										
											2008-05-12 20:31:56 -04:00
										 |  |  | IN: ftp | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-18 14:36:23 -05:00
										 |  |  | 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 ;
 |