Truncates a file to a given length
ftruncate ( resource $handle , int $size ) : bool
The file pointer.
Note: The handle must be open for writing.
The size to truncate to.
Note: If size is larger than the file then the file is extended with null bytes. If size is smaller than the file then the file is truncated to that size.
Returns TRUE on success or FALSE on failure.