]> gitweb.factorcode.org Git - factor.git/blob - basis/io/unix/files/bsd/bsd.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / basis / io / unix / files / bsd / bsd.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel alien.syntax math io.unix.files system
4 unix.stat accessors combinators calendar.unix ;
5 IN: io.unix.files.bsd
6
7 TUPLE: bsd-file-info < unix-file-info birth-time flags gen ;
8
9 M: bsd new-file-info ( -- class ) bsd-file-info new ;
10
11 M: bsd stat>file-info ( stat -- file-info )
12     [ call-next-method ] keep
13     {
14         [ stat-st_flags >>flags ]
15         [ stat-st_gen >>gen ]
16         [
17             stat-st_birthtimespec timespec>unix-time
18             >>birth-time
19         ]
20     } cleave ;