interface ArchiverInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Archiver/ArchiverInterface.php \Drupal\Core\Archiver\ArchiverInterface
- 8.9.x core/lib/Drupal/Core/Archiver/ArchiverInterface.php \Drupal\Core\Archiver\ArchiverInterface
- 10 core/lib/Drupal/Core/Archiver/ArchiverInterface.php \Drupal\Core\Archiver\ArchiverInterface
- 11.x core/lib/Drupal/Core/Archiver/ArchiverInterface.php \Drupal\Core\Archiver\ArchiverInterface
Defines the common interface for all Archiver classes.
Hierarchy
- interface \ArchiverInterface
Expanded class hierarchy of ArchiverInterface
All classes that implement ArchiverInterface
File
-
includes/
archiver.inc, line 11
View source
interface ArchiverInterface {
/**
* Constructs a new archiver instance.
*
* @param $file_path
* The full system path of the archive to manipulate. Only local files
* are supported. If the file does not yet exist, it will be created if
* appropriate.
*/
public function __construct($file_path);
/**
* Adds the specified file or directory to the archive.
*
* @param $file_path
* The full system path of the file or directory to add. Only local files
* and directories are supported.
*
* @return ArchiverInterface
* The called object.
*/
public function add($file_path);
/**
* Removes the specified file from the archive.
*
* @param $path
* The file name relative to the root of the archive to remove.
*
* @return ArchiverInterface
* The called object.
*/
public function remove($path);
/**
* Extracts multiple files in the archive to the specified path.
*
* @param $path
* A full system path of the directory to which to extract files.
* @param $files
* Optionally specify a list of files to be extracted. Files are
* relative to the root of the archive. If not specified, all files
* in the archive will be extracted.
*
* @return ArchiverInterface
* The called object.
*/
public function extract($path, array $files = array());
/**
* Lists all files in the archive.
*
* @return
* An array of file names relative to the root of the archive.
*/
public function listContents();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ArchiverInterface::add | public | function | Adds the specified file or directory to the archive. | 2 |
ArchiverInterface::extract | public | function | Extracts multiple files in the archive to the specified path. | 2 |
ArchiverInterface::listContents | public | function | Lists all files in the archive. | 2 |
ArchiverInterface::remove | public | function | Removes the specified file from the archive. | 2 |
ArchiverInterface::__construct | public | function | Constructs a new archiver instance. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.