www.delorie.com/djgpp/doc/libc/libc_830.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

truncate

Syntax

 
#include <unistd.h>

int truncate(const char *file, off_t size);

Description

This function truncates file to size bytes.

Return Value

Zero on success, nonzero on failure.

Portability

ANSI/ISO C No
POSIX No

Example

 
truncate("/tmp/data.txt", 400);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004