File and Path Function
int truncate(const char *filename, off_t length);
Internationalization (I18n) Function Overview
The truncate function changes the size of filename to length .
If length is shorter than the previous length, data at the end will be lost.
The file must be writable by the user to perform this operation.
The function returns 0 if successful; else it returns -1 and sets
the global errno variable with the error value.
There is no wide-character version of the function.
I18n Issues
On ANSI UTF-16 platforms, use a conversion function to convert the
wide-character string to a multibyte-character string and then call truncate .
See Pathnames for a discussion of path and filename considerations in
an internationalized application.
Recommended Replacements*
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.
File and Path Functions
|