src/Debug/FileStreamWrapper.php
public function stream_truncate($size)
    {
        if (!$this->handle) {
            return false;
        }
        self::restorePrev();
        $success = \ftruncate($this->handle, $size);
        self::register();
        return $success;
    }
public function stream_truncate($size)
    {
        if (!$this->handle) {
            return false;
        }
        self::restorePrev();
        $success = \ftruncate($this->handle, $size);
        self::register();
        return $success;
    }
Truncates a file to the given size

@param integer $size Truncate to this size

@return boolean

@see http://php.net/manual/en/streamwrapper.stream-truncate.php