interface BackupFileWritableInterface in Backup and Migrate 8.4
Provides a service to provision temp files in the correct place for the environment.
Hierarchy
- interface \BackupMigrate\Core\File\BackupFileInterface
- interface \BackupMigrate\Core\File\BackupFileReadableInterface
- interface \BackupMigrate\Core\File\BackupFileWritableInterface
- interface \BackupMigrate\Core\File\BackupFileReadableInterface
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
File
- lib/
backup_migrate_core/ src/ File/ BackupFileWritableInterface.php, line 8
Namespace
BackupMigrate\Core\FileView 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
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BackupFileInterface:: |
public | function | Get the full file extension. | 1 |
BackupFileInterface:: |
public | function | Get the last file extension. | 1 |
BackupFileInterface:: |
public | function | Get an array of file extensions. | 1 |
BackupFileInterface:: |
public | function | Get the full filename with extensions. | 1 |
BackupFileInterface:: |
public | function | Get a metadata value. | 1 |
BackupFileInterface:: |
public | function | Get all meta data as an array. | 1 |
BackupFileInterface:: |
public | function | Get the file name without extension. | 1 |
BackupFileInterface:: |
public | function | Set the extension array for the file to the given array. | 1 |
BackupFileInterface:: |
public | function | Set the full filename with extensions. | 1 |
BackupFileInterface:: |
public | function | Set the file name without extension. | 1 |
BackupFileReadableInterface:: |
public | function | Open a file for reading or writing. | 1 |
BackupFileReadableInterface:: |
public | function | Read a line from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Read a given number of bytes from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Read a single line from the file. | 1 |
BackupFileReadableInterface:: |
public | function | Rewind the file handle to the start of the file. | 1 |
BackupFileReadableInterface:: |
public | function | Move the file pointer forward a given number of bytes. | 1 |
BackupFileWritableInterface:: |
public | function |
Close a file when we're done reading/writing. Overrides BackupFileReadableInterface:: |
|
BackupFileWritableInterface:: |
public | function | Open a file for reading or writing. | 1 |
BackupFileWritableInterface:: |
function |
Get the realpath of the file. Overrides BackupFileReadableInterface:: |
||
BackupFileWritableInterface:: |
public | function |
Set a metadata value. Overrides BackupFileInterface:: |
|
BackupFileWritableInterface:: |
public | function |
Set a metadata value. Overrides BackupFileInterface:: |
|
BackupFileWritableInterface:: |
public | function | Write a line to the file. | 1 |
BackupFileWritableInterface:: |
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 |