You are here

interface BackupFileReadableInterface 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 BackupFileReadableInterface

All classes that implement BackupFileReadableInterface

20 files declare their use of BackupFileReadableInterface
ArchiveReaderInterface.php in lib/backup_migrate_core/src/Service/ArchiveReaderInterface.php
ArchiverInterface.php in lib/backup_migrate_core/src/Service/ArchiverInterface.php
BrowserDownloadDestination.php in lib/backup_migrate_core/src/Destination/BrowserDownloadDestination.php
CompressionFilter.php in lib/backup_migrate_core/src/Filter/CompressionFilter.php
DebugDestination.php in lib/backup_migrate_core/src/Destination/DebugDestination.php

... See full list

File

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

Namespace

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

  /**
   * A path or stream that can be used in php file functions.
   *
   * @return string
   */
  public function realpath();

  /**
   * Read a given number of bytes from the file.
   *
   * @param int $size The number of bites to read
   *
   * @return string The data read from the file or NULL if the file can't be read or is at the end of the file.
   */
  public function readBytes($size = 0);

  /**
   * Read a single line from the file.
   *
   * @return string The data read from the file or NULL if the file can't be read or is at the end of the file.
   */
  public function readLine();

  /**
   * Read a line from the file.
   *
   * @return string The data read from the file or NULL if the file can't be read.
   */
  public function readAll();

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

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

  /**
   * Move the file pointer forward a given number of bytes.
   *
   * @param int $bytes
   *
   * @return int
   *  The number of bytes moved or -1 if the operation failed.
   */
  public function seekBytes($bytes);

  /**
   * Rewind the file handle to the start of the file.
   */
  public function rewind();

}

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::setMeta public function Set a metadata value. 2
BackupFileInterface::setMetaMultiple public function Set a metadata value. 2
BackupFileInterface::setName public function Set the file name without extension. 1
BackupFileReadableInterface::close public function Close a file when we're done reading/writing. 2
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::realpath public function A path or stream that can be used in php file functions. 2
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