public function stream_truncate($new_size)
    {
        if ($this->isReadOnly) {
            return false;
        }
        $this->needsFlush = true;
        $this->ensureWritableHandle();

        return ftruncate($this->handle, $new_size);
    }
public function stream_truncate($new_size)
    {
        if ($this->isReadOnly) {
            return false;
        }
        $this->needsFlush = true;
        $this->ensureWritableHandle();

        return ftruncate($this->handle, $new_size);
    }
public function stream_truncate ( $ new_size ) { if ( $ this -> isReadOnly ) { return false ; } $ this -> needsFlush = true ; $ this -> ensureWritableHandle ( ) ; return ftruncate ( $ this -> handle , $ new_size ) ; }
Truncates the stream.

@param int $new_size

@return bool True on success, false on failure.
Truncates the stream .