File system
File system ftruncate
// PROTOTYPE
int ftruncate(int fd, off_t length)
Truncate an open file to a given length.
fd: The file descriptor for the file, return from theopencall.length: length in bytes.
Returns 0 on success. On error, returns -1 and sets errno. Some possible errno values include:
ENOENT: File does not exist.ENOSPCThere is no space on the file system.