Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rar_entry_get(3) [php man page]

RAR_ENTRY_GET(3)							 1							  RAR_ENTRY_GET(3)

RarArchive::getEntry - Get entry object from the RAR archive

       Object oriented style (method):

SYNOPSIS
public RarEntry RarArchive::getEntry (string $entryname) DESCRIPTION
Procedural style: RarEntry rar_entry_get (RarArchive $rarfile, string $entryname) Get entry object (file or directory) from the RAR archive. Note You can also get entry objects using RarArchive::getEntries. Note that a RAR archive can have multiple entries with the same name; this method will retrieve only the first. PARAMETERS
o $rarfile - A RarArchive object, opened with rar_open(3). o $entryname - Path to the entry within the RAR archive. Note The path must be the same returned by RarEntry::getName. RETURN VALUES
Returns the matching RarEntry object or FALSE on failure. EXAMPLES
Example #1 Object oriented style <?php $rar_arch = RarArchive::open('solid.rar'); if ($rar_arch === FALSE) die("Could not open RAR archive."); $rar_entry = $rar_arch->getEntry('tese.txt'); if ($rar_entry === FALSE) die("Could get such entry"); echo get_class($rar_entry)." "; echo $rar_entry; $rar_arch->close(); ?> The above example will output something similar to: RarEntry RarEntry for file "tese.txt" (23b93a7a) Example #2 Procedural style <?php $rar_arch = rar_open('solid.rar'); if ($rar_arch === FALSE) die("Could not open RAR archive."); $rar_entry = rar_entry_get($rar_arch, 'tese.txt'); if ($rar_entry === FALSE) die("Could get such entry"); echo get_class($rar_entry)." "; echo $rar_entry; rar_close($rar_arch); ?> SEE ALSO
RarArchive::getEntries, rar:// wrapper. PHP Documentation Group RAR_ENTRY_GET(3)

Check Out this Related Man Page

RAR_CLOSE(3)								 1							      RAR_CLOSE(3)

RarArchive::close - Close RAR archive and free all resources

       Object oriented style (method):

SYNOPSIS
public bool RarArchive::close (void ) DESCRIPTION
Procedural style: bool rar_close (RarArchive $rarfile) Close RAR archive and free all allocated resources. PARAMETERS
o $rarfile - A RarArchive object, opened with rar_open(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 2.0.0 | | | | | | | The RAR entries returned by RarArchive::getEntry | | | and RarArchive::getEntries are now invalidated | | | when calling this method. This means that all | | | instance methods called for such entries and not | | | guaranteed to succeed. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Object oriented style <?php $rar_arch = RarArchive::open('latest_winrar.rar'); echo $rar_arch." "; $rar_arch->close(); echo $rar_arch." "; ?> The above example will output something similar to: RAR Archive "D:php_rar runk estslatest_winrar.rar" RAR Archive "D:php_rar runk estslatest_winrar.rar" (closed) Example #2 Procedural style <?php $rar_arch = rar_open('latest_winrar.rar'); echo $rar_arch." "; rar_close($rar_arch); echo $rar_arch." "; ?> PHP Documentation Group RAR_CLOSE(3)
Man Page