]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/unix.factor
unix: adding truncate-file.
[factor.git] / basis / unix / unix.factor
index 7d5549e4336447537440a45f90305e298bb164ee..3ac845aab497b889107cf3c8fc4f6e282293a5c9 100644 (file)
@@ -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 -- )