Next: , Previous: , Up: posix fd   [Index]


4.13.12 Truncating files

Function: truncate pathname length

Interface to the C function truncate(), (libc)truncate. Change the size of the file selected by pathname to length; if successful return unspecified values, else raise an exception.

length must be non–negative exact integer in the range of the C language type off_t.

Function: ftruncate fd length

Interface to the C function ftruncate(), (libc)ftruncate. Changes the size of the file selected by the file descriptor fd to length; if successful return unspecified values, else raise an exception.

length must be non–negative exact integer in the range of the C language type off_t.