You are here

public function ArchiverZip::listContents in Drupal 7

Lists all files in the archive.

Return value

An array of file names relative to the root of the archive.

Overrides ArchiverInterface::listContents

File

modules/system/system.archiver.inc, line 118
Archiver implementations provided by the system module.

Class

ArchiverZip
Archiver for .zip files.

Code

public function listContents() {
  $files = array();
  for ($i = 0; $i < $this->zip->numFiles; $i++) {
    $files[] = $this->zip
      ->getNameIndex($i);
  }
  return $files;
}