unix: adding truncate-file.
parent
cff606f474
commit
7b50fd3601
|
@ -176,6 +176,8 @@ FUNCTION: int setuid ( uid_t uid ) ;
|
|||
FUNCTION: int socket ( int domain, int type, int protocol ) ;
|
||||
FUNCTION: int symlink ( c-string path1, c-string path2 ) ;
|
||||
FUNCTION: int link ( c-string path1, c-string path2 ) ;
|
||||
FUNCTION: int ftruncate ( int fd, int length ) ;
|
||||
FUNCTION: int truncate ( c-string path, int length ) ;
|
||||
FUNCTION: int unlink ( c-string path ) ;
|
||||
FUNCTION: int utimes ( c-string path, timeval[2] times ) ;
|
||||
FUNCTION: ssize_t write ( int fd, void* buf, size_t nbytes ) ;
|
||||
|
|
|
@ -56,6 +56,8 @@ M: unix open-file [ open ] unix-system-call ;
|
|||
|
||||
: make-fifo ( path mode -- ) [ mkfifo ] unix-system-call drop ;
|
||||
|
||||
: truncate-file ( path n -- ) [ truncate ] unix-system-call drop ;
|
||||
|
||||
: touch ( filename -- ) f [ utime ] unix-system-call drop ;
|
||||
|
||||
: change-file-times ( filename access modification -- )
|
||||
|
|
Loading…
Reference in New Issue