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

Breadcrumb

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

function vfsStreamFile::openWithTruncate

open file and truncate content

@since 0.9

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php, line 149

Class

vfsStreamFile
File container.

Namespace

org\bovigo\vfs

Code

public function openWithTruncate() {
    $this->open();
    $this->content
        ->truncate(0);
    $time = time();
    $this->lastAccessed = $time;
    $this->lastModified = $time;
}

API Navigation

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