| www.delorie.com/djgpp/doc/libc-2.01/libc_307.html | search |
#include <unistd.h> int ftruncate(int file, off_t where);
This function truncates file at where length. This only works if the file is closed right after this call.
Zero for success, nonzero for failure.
int x = open("data", O_WRONLY);
ftruncate(x, 1000);
close(x);
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |