Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. vfsStreamFile.php

function 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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal