Skip to content
Snippets Groups Projects
Select Git revision
  • issue-752
  • develop
  • master default
  • issue-677
  • issue-677-original-with-migrate
  • issue-716
  • issue-654
  • issue-732
  • issue-737
  • issue-735
  • issue-707
  • issue-706
  • issue-705
  • issue-703
  • issue-696
  • issue-690
  • issue-675
  • issue-670
  • issue-635
  • issue-404
  • 7.19
  • 2012-04-18
  • 2012-04-03
  • 2012-04-02
  • 2012-03-01
  • 2012-02-07
  • 20120207
  • 2012-01-13
  • 2012-01-12
  • 2011-12-16
  • 2011-12-05
  • 2011-11-17
  • 2011-11-14
  • 2011-11-08.2
  • 2011-11-08
  • 2011-11-01
  • 2011-10-27
  • 2011-10-06
  • 2011-10-03
  • 2011-09-19
40 results

archiver.inc

Blame
  • Forked from UNL Information Services / UNL-CMS
    59 commits behind the upstream repository.
    archiver.inc 1.66 KiB
    <?php
    
    /**
     * @file
     * Shared classes and interfaces for the archiver system.
     */
    
    /**
     * Defines the common interface for all Archiver classes.
     */
    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();
    }