You are here

interface BackupFileWritableInterface in Backup and Migrate 8.4

Provides a service to provision temp files in the correct place for the environment.

Hierarchy

Expanded class hierarchy of BackupFileWritableInterface

All classes that implement BackupFileWritableInterface

7 files declare their use of BackupFileWritableInterface
ArchiveWriterInterface.php in lib/backup_migrate_core/src/Service/ArchiveWriterInterface.php
CompressionFilter.php in lib/backup_migrate_core/src/Filter/CompressionFilter.php
DrupalEncrypt.php in src/Filter/DrupalEncrypt.php
MetadataWriter.php in lib/backup_migrate_core/src/Filter/MetadataWriter.php
MySQLiSource.php in lib/backup_migrate_core/src/Source/MySQLiSource.php

... See full list

File

lib/backup_migrate_core/src/File/BackupFileWritableInterface.php, line 8

Namespace

BackupMigrate\Core\File
View source
interface BackupFileWritableInterface extends BackupFileReadableInterface {

  /**
   * Get the realpath of the file.
   *
   * @return string The path or stream URI to the file or NULL if the file does not exist.
   */
  function realpath();

  /**
   * Write a line to the file.
   *
   * @param string $data A string to write to the file.
   */
  public function write($data);

  /**
   * A shorthand function to open the file, write the given contents and close
   * the file. Used for small amounts of data that can fit in memory.
   *
   * @param string $data The contents to write.
   */
  public function writeAll($data);

  /**
   * Get a metadata value.
   *
   * @param string $key The key for the metadata item.
   *
   * @return mixed The value of the metadata for this file.
   */

  // public function getMeta($key);

  /**
   * Set a metadata value.
   *
   * @param string $key The key for the metadata item.
   * @param mixed $value The value for the metadata item.
   */
  public function setMeta($key, $value);

  /**
   * Set a metadata value.
   *
   * @param array $values An array of key-value pairs for the file metadata.
   */
  public function setMetaMultiple($values);

  /**
   * Open a file for reading or writing.
   *
   * @param bool $binary If true open as a binary file
   */
  public function openForWrite($binary = FALSE);

  /**
   * Close a file when we're done reading/writing.
   */
  public function close();

}

Members

Namesort descending Modifiers Type Description Overrides
BackupFileInterface::getExt public function Get the full file extension. 1
BackupFileInterface::getExtLast public function Get the last file extension. 1
BackupFileInterface::getExtList public function Get an array of file extensions. 1
BackupFileInterface::getFullName public function Get the full filename with extensions. 1
BackupFileInterface::getMeta public function Get a metadata value. 1
BackupFileInterface::getMetaAll public function Get all meta data as an array. 1
BackupFileInterface::getName public function Get the file name without extension. 1
BackupFileInterface::setExtList public function Set the extension array for the file to the given array. 1
BackupFileInterface::setFullName public function Set the full filename with extensions. 1
BackupFileInterface::setName public function Set the file name without extension. 1
BackupFileReadableInterface::openForRead public function Open a file for reading or writing. 1
BackupFileReadableInterface::readAll public function Read a line from the file. 1
BackupFileReadableInterface::readBytes public function Read a given number of bytes from the file. 1
BackupFileReadableInterface::readLine public function Read a single line from the file. 1
BackupFileReadableInterface::rewind public function Rewind the file handle to the start of the file. 1
BackupFileReadableInterface::seekBytes public function Move the file pointer forward a given number of bytes. 1
BackupFileWritableInterface::close public function Close a file when we're done reading/writing. Overrides BackupFileReadableInterface::close
BackupFileWritableInterface::openForWrite public function Open a file for reading or writing. 1
BackupFileWritableInterface::realpath function Get the realpath of the file. Overrides BackupFileReadableInterface::realpath
BackupFileWritableInterface::setMeta public function Set a metadata value. Overrides BackupFileInterface::setMeta
BackupFileWritableInterface::setMetaMultiple public function Set a metadata value. Overrides BackupFileInterface::setMetaMultiple
BackupFileWritableInterface::write public function Write a line to the file. 1
BackupFileWritableInterface::writeAll public function A shorthand function to open the file, write the given contents and close the file. Used for small amounts of data that can fit in memory. 1