函数名: chsize
功  能: 改变文件大小
用  法: int chsize(int handle, long size);
程序例:
#include <string.h>
#include <fcntl.h>
#include <io.h>
int main(void)
{
   int handle;
   char buf[11] = "0123456789";
   /* create text file containing 10 bytes */
   handle = open("DUMMY.FIL", O_CREAT);
   write(handle, buf, strlen(buf));
   /* truncate the file to 5 bytes in size */
   chsize(handle, 5);
   /* close the file */
   close(handle);
   return 0;
}