You are here

protected function ReadableStreamBackupFile::loadFileStats in Backup and Migrate 5.0.x

Get info about the file and load them as metadata.

2 calls to ReadableStreamBackupFile::loadFileStats()
ReadableStreamBackupFile::__construct in src/Core/File/ReadableStreamBackupFile.php
Constructor.
WritableStreamBackupFile::close in src/Core/File/WritableStreamBackupFile.php
Update the file time and size when the file is closed.

File

src/Core/File/ReadableStreamBackupFile.php, line 193

Class

ReadableStreamBackupFile
Uses a readable PHP stream such as a local file.

Namespace

Drupal\backup_migrate\Core\File

Code

protected function loadFileStats() {
  clearstatcache();
  $this
    ->setMeta('filesize', filesize($this
    ->realpath()));
  $this
    ->setMeta('datestamp', filectime($this
    ->realpath()));
}