1 stream_wrappers.inc public BackdropLocalStreamWrapper::stream_truncate($new_size)

Truncate stream.

Will respond to truncation; e.g., through ftruncate().

Parameters

int $new_size: The new size.

Return value

bool: TRUE on success, FALSE otherwise.

File

core/includes/stream_wrappers.inc, line 638
Backdrop stream wrapper interface.

Class

BackdropLocalStreamWrapper
Backdrop stream wrapper base class for local files.

Code

public function stream_truncate($new_size) {
  return ftruncate($this->handle, $new_size);
}