You are here

interface ArchiveWriterInterface in Backup and Migrate 8.4

Interface ArchiveReaderInterface.

@package BackupMigrate\Core\Service

Hierarchy

Expanded class hierarchy of ArchiveWriterInterface

All classes that implement ArchiveWriterInterface

1 file declares its use of ArchiveWriterInterface
FileDirectorySource.php in lib/backup_migrate_core/src/Source/FileDirectorySource.php

File

lib/backup_migrate_core/src/Service/ArchiveWriterInterface.php, line 12

Namespace

BackupMigrate\Core\Service
View source
interface ArchiveWriterInterface {

  /**
   * Get the file extension for this archiver. For a tarball writer this would
   * be 'tar'. For a Zip file writer this would be 'zip'.
   *
   * @return string
   */
  public function getFileExt();

  /**
   * @param \BackupMigrate\Core\File\BackupFileWritableInterface $out
   */
  public function setArchive(BackupFileWritableInterface $out);

  /**
   * @param string $real_path
   *  The real path to the file. Can be a stream URI.
   * @param string $new_path
   *  The path that the file should have in the archive. Leave blank to use the original path.
   * @return
   */
  public function addFile($real_path, $new_path = '');

  /**
   * This will be called when all files have been added. It gives the implementation
   * a chance to clean up and commit the changes if needed.
   *
   * @return mixed
   */
  public function closeArchive();

}

Members

Namesort descending Modifiers Type Description Overrides
ArchiveWriterInterface::addFile public function 1
ArchiveWriterInterface::closeArchive public function This will be called when all files have been added. It gives the implementation a chance to clean up and commit the changes if needed. 1
ArchiveWriterInterface::getFileExt public function Get the file extension for this archiver. For a tarball writer this would be 'tar'. For a Zip file writer this would be 'zip'. 1
ArchiveWriterInterface::setArchive public function 1