◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The _chsize function extends or truncates the file associated with <handle> to the length specified by <size>. The file must be open in a mode that permits writing. Null characters (\0) are appended if the file is extended. If the file is truncated, all data from the end of the shortened file to the original length of the file is lost. In DOS and Windows, the directory update is done when a file is closed. Consequently, while a program is running, requests to determine the amount of free disk space may receive inaccurate results. Return Value The _chsize function returns the value 0 if the file size is successfully changed. A return value of -1 indicates an error, and errno is set to EACCES, EBADF, or ENOSPC. -♦-