Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>ftruncate</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ftruncate
=========

Syntax
------

     #include <unistd.h>
     
     int ftruncate(int file, off_t where);

Description
-----------

This function truncates FILE at WHERE length.  This only works if the
file is closed right after this call.

Return Value
------------

Zero for success, nonzero for failure.

Example
-------

     int x = open("data", O_WRONLY);
     ftruncate(x, 1000);
     close(x);


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson