RarArchive::close
rar_close
(PECL rar >= 2.0.0)
RarArchive::close -- rar_close — Close RAR archive and free all resources
Description
Object oriented style (method):
public bool RarArchive::close
( void
)
Procedural style:
Close RAR archive and free all allocated resources.
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."\n";
$rar_arch->close();
echo $rar_arch."\n";
?>
The above example will output something similar to:
RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar" RAR Archive "D:\php_rar\trunk\tests\latest_winrar.rar" (closed)
Example #2 Procedural style
<?php
$rar_arch = rar_open('latest_winrar.rar');
echo $rar_arch."\n";
rar_close($rar_arch);
echo $rar_arch."\n";
?>
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для сжатия и архивации
- Архивирование Rar
- Функция RarArchive::close() - Закрывает RAR архив и освобождает все ресурсы
- Функция RarArchive::getComment() - Get comment text from the RAR archive
- Функция RarArchive::getEntries() - Возвращает полный список элемнтов из RAR архива
- Функция RarArchive::getEntry() - Возвращает объект элемента из RAR архива
- Функция RarArchive::isBroken() - Test whether an archive is broken (incomplete)
- Функция RarArchive::isSolid() - Check whether the RAR archive is solid
- Функция RarArchive::open() - Открывает RAR архив
- Функция RarArchive::setAllowBroken() - Whether opening broken archives is allowed
- Функция RarArchive::__toString() - Get text representation
Коментарии
404 Not Found