] if ;
M: unix move-file ( from to -- )
- [ normalize-path ] bi@ rename io-error ;
+ [ normalize-path ] bi@ [ rename ] unix-system-call io-error ;
M: unix delete-file ( path -- ) normalize-path unlink-file ;
M: unix make-directory ( path -- )
- normalize-path OCT: 777 mkdir io-error ;
+ normalize-path OCT: 777 [ mkdir ] unix-system-call io-error ;
M: unix delete-directory ( path -- )
- normalize-path rmdir io-error ;
+ normalize-path [ rmdir ] unix-system-call io-error ;
M: unix copy-file ( from to -- )
[ normalize-path ] bi@ call-next-method ;
: with-unix-directory ( path quot -- )
- [ opendir dup [ (io-error) ] unless ] dip
- dupd curry swap '[ _ closedir io-error ] [ ] cleanup ; inline
+ [ [ opendir ] unix-system-call dup [ (io-error) ] unless ] dip
+ dupd curry swap '[ _ [ closedir ] unix-system-call io-error ] [ ] cleanup ; inline
HOOK: find-next-file os ( DIR* -- byte-array )
M: unix find-next-file ( DIR* -- byte-array )
dirent <struct>
f <void*>
- [ readdir_r 0 = [ (io-error) ] unless ] 2keep
+ [ [ readdir_r ] unix-system-call 0 = [ (io-error) ] unless ] 2keep
*void* [ drop f ] unless ;
: dirent-type>file-type ( ch -- type )