]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/stat/macosx/macosx.factor
4e6b2dfb21e2d1400f4c78d0fe55165765bb0fd9
[factor.git] / basis / unix / stat / macosx / macosx.factor
1 USING: alien.c-types arrays accessors combinators classes.struct
2 alien.syntax unix.time unix.types unix.ffi ;
3 IN: unix.stat
4
5 ! Mac OS X
6
7 ! stat64 structure
8 STRUCT: stat
9     { st_dev dev_t }
10     { st_mode mode_t }
11     { st_nlink nlink_t }
12     { st_ino ino64_t }
13     { st_uid uid_t }
14     { st_gid gid_t }
15     { st_rdev dev_t }
16     { st_atimespec timespec }
17     { st_mtimespec timespec }
18     { st_ctimespec timespec }
19     { st_birthtimespec timespec }
20     { st_size off_t }
21     { st_blocks blkcnt_t }
22     { st_blksize blksize_t }
23     { st_flags __uint32_t }
24     { st_gen __uint32_t }
25     { st_lspare __int32_t }
26     { st_qspare0 __int64_t }
27     { st_qspare1 __int64_t } ;
28
29 FUNCTION: int stat64  ( char* pathname, stat* buf ) ;
30 FUNCTION: int lstat64 ( char* pathname, stat* buf ) ;
31
32 : stat ( path buf -- n ) stat64 ;
33 : lstat ( path buf -- n ) lstat64 ;