| 
									
										
										
										
											2008-10-07 00:02:06 -04:00
										 |  |  | ! Copyright (C) 2008 Doug Coleman. | 
					
						
							|  |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							| 
									
										
										
										
											2008-12-14 21:03:00 -05:00
										 |  |  | USING: kernel alien.syntax math io.files.unix system | 
					
						
							|  |  |  | unix.stat accessors combinators calendar.unix | 
					
						
							|  |  |  | io.files.info.unix ;
 | 
					
						
							|  |  |  | IN: io.files.info.unix.bsd | 
					
						
							| 
									
										
										
										
											2008-10-07 00:02:06 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | TUPLE: bsd-file-info < unix-file-info birth-time flags gen ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: bsd new-file-info ( -- class ) bsd-file-info new ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | M: bsd stat>file-info ( stat -- file-info )
 | 
					
						
							|  |  |  |     [ call-next-method ] keep
 | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2009-08-30 05:06:41 -04:00
										 |  |  |         [ st_flags>> >>flags ] | 
					
						
							|  |  |  |         [ st_gen>> >>gen ] | 
					
						
							|  |  |  |         [ st_birthtimespec>> timespec>unix-time >>birth-time ] | 
					
						
							| 
									
										
										
										
											2008-10-07 00:02:06 -04:00
										 |  |  |     } cleave ;
 |