You are here

public function vfsStreamFile::truncate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php \org\bovigo\vfs\vfsStreamFile::truncate()

Truncates a file to a given length

@since 1.1.0

Parameters

int $size length to truncate file to:

Return value

bool

File

vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamFile.php, line 207

Class

vfsStreamFile
File container.

Namespace

org\bovigo\vfs

Code

public function truncate($size) {
  $this->content
    ->truncate($size);
  $this->lastModified = time();
  return true;
}