array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'rararchive.getentries.php', 1 => 'RarArchive::getEntries', 2 => 'Get full list of entries from the RAR archive', ), 'up' => array ( 0 => 'class.rararchive.php', 1 => 'RarArchive', ), 'prev' => array ( 0 => 'rararchive.getcomment.php', 1 => 'RarArchive::getComment', ), 'next' => array ( 0 => 'rararchive.getentry.php', 1 => 'RarArchive::getEntry', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rar/rararchive/getentries.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL rar >= 2.0.0)
RarArchive::getEntries -- rar_list — Get full list of entries from the RAR archive
Nesne yönelimli kullanım (method):
Yordamsal kullanım:
Get entries list (files and directories) from the RAR archive.
Bilginize:
If the archive has entries with the same name, this method, together with RarArchive
foreachiteration and array-like access with numeric indexes, are the only ones to access all the entries (i.e., RarArchive::getEntry() and therar://wrapper are insufficient).
| Sürüm: | Açıklama |
|---|---|
| PECL rar 3.0.0 | Support for RAR archives with repeated entry names is no longer defective. |
Örnek 1 Nesne yönelimli kullanım
<?php
$rar_arch = RarArchive::open('solid.rar');
if ($rar_arch === FALSE)
die("Could not open RAR archive.");
$rar_entries = $rar_arch->getEntries();
if ($rar_entries === FALSE)
die("Could not retrieve entries.");
echo "Found " . count($rar_entries) . " entries.\n";
foreach ($rar_entries as $e) {
echo $e;
echo "\n";
}
$rar_arch->close();
?>Yukarıdaki örnek şuna benzer bir çıktı üretir:
Found 2 entries. RarEntry for file "tese.txt" (23b93a7a) RarEntry for file "unrardll.txt" (2ed64b6e)
Örnek 2 Yordamsal kullanım
<?php
$rar_arch = rar_open('solid.rar');
if ($rar_arch === FALSE)
die("Could not open RAR archive.");
$rar_entries = rar_list($rar_arch);
if ($rar_entries === FALSE)
die("Could retrieve entries.");
echo "Found " . count($rar_entries) . " entries.\n";
foreach ($rar_entries as $e) {
echo $e;
echo "\n";
}
rar_close($rar_arch);
?>