Merge branch 'master' of git://factorcode.org/git/factor
commit
6e9037c21a
|
@ -54,6 +54,7 @@ TUPLE: no-parent-directory path ;
|
|||
TUPLE: file-info type size permissions modified ;
|
||||
|
||||
HOOK: file-info io-backend ( path -- info )
|
||||
HOOK: link-info io-backend ( path -- info )
|
||||
|
||||
SYMBOL: +regular-file+
|
||||
SYMBOL: +directory+
|
||||
|
|
|
@ -89,3 +89,12 @@ M: unix-io file-info ( path -- info )
|
|||
[ stat-st_mtim timespec-sec seconds unix-1970 time+ ]
|
||||
} cleave
|
||||
\ file-info construct-boa ;
|
||||
|
||||
M: unix-io link-info ( path -- info )
|
||||
lstat* {
|
||||
[ stat>type ]
|
||||
[ stat-st_size ]
|
||||
[ stat-st_mode ]
|
||||
[ stat-st_mtim timespec-sec seconds unix-1970 time+ ]
|
||||
} cleave
|
||||
\ file-info construct-boa ;
|
||||
|
|
|
@ -74,3 +74,8 @@ FUNCTION: int mkdir ( char* path, mode_t mode ) ;
|
|||
"stat" <c-object> dup >r
|
||||
stat check-status
|
||||
r> ;
|
||||
|
||||
: lstat* ( pathname -- stat )
|
||||
"stat" <c-object> dup >r
|
||||
lstat check-status
|
||||
r> ;
|
||||
|
|
Loading…
Reference in New Issue