You are here

public function StreamDestination::checkWritable in Backup and Migrate 8.4

1 method overrides StreamDestination::checkWritable()
BrowserDownloadDestination::checkWritable in lib/backup_migrate_core/src/Destination/BrowserDownloadDestination.php

File

lib/backup_migrate_core/src/Destination/StreamDestination.php, line 39

Class

StreamDestination
Class StreamDestination.

Namespace

BackupMigrate\Core\Destination

Code

public function checkWritable() {
  $stream_uri = $this
    ->confGet('streamuri');

  // The stream must exist.
  if (!file_exists($stream_uri)) {
    throw new DestinationNotWritableException('The file stream !uri does not exist.', [
      '%uri' => $stream_uri,
    ]);
  }

  // The stream must be writable.
  if (!file_exists($stream_uri)) {
    throw new DestinationNotWritableException('The file stream !uri cannot be written to.', [
      '%uri' => $stream_uri,
    ]);
  }
}