RarArchive::close

rar_close

(PECL rar >= 2.0.0)

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

Descrição

Estilo orientado a objetos (method):

public RarArchive::close(): bool

Estilo procedural:

rar_close(RarArchive $rarfile): bool

Close RAR archive and free all allocated resources.

Parâmetros

rarfile

A RarArchive object, opened with rar_open().

Valor Retornado

Retorna true em caso de sucesso ou false em caso de falha.

Registro de Alterações

Versão Descrição
PECL rar 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.

Exemplos

Exemplo #1 Estilo orientado a objetos

<?php
$rar_arch
= RarArchive::open('latest_winrar.rar');
echo
$rar_arch."\n";
$rar_arch->close();
echo
$rar_arch."\n";
?>

O exemplo acima produzirá algo semelhante a:

RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar"
RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar" (closed)

Exemplo #2 Estilo procedural

<?php
$rar_arch
= rar_open('latest_winrar.rar');
echo
$rar_arch."\n";
rar_close($rar_arch);
echo
$rar_arch."\n";
?>

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top