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)
Check Out this Related Man Page
RAR_BROKEN_IS(3) 1 RAR_BROKEN_IS(3)RarArchive::isBroken - Test whether an archive is broken (incomplete)
Object oriented style (method):
SYNOPSIS
public bool RarArchive::isBroken (void )
DESCRIPTION
Procedural style:
bool rar_broken_is (RarArchive $rarfile)
This function determines whether an archive is incomplete, i.e., if a volume is missing or a volume is truncated.
PARAMETERS
o $rarfile
- A RarArchive object, opened with rar_open(3).
RETURN VALUES
Returns TRUE if the archive is broken, FALSE otherwise. This function may also return FALSE if the passed file has already been closed.
The only way to tell the two cases apart is to enable exceptions with RarException::setUsingExceptions; however, this should be unnecessary
as a program should not operate on closed files.
EXAMPLES
Example #1
Object oriented style
<?php
function retnull() { return null; }
$file = dirname(__FILE__) . "/multi_broken.part1.rar";
/* Third argument is used to omit notice */
$arch = RarArchive::open($file, null, 'retnull');
var_dump($arch->isBroken());
?>
The above example will output something similar to:
bool(true)
Example #2
Procedural style
<?php
function retnull() { return null; }
$file = dirname(__FILE__) . "/multi_broken.part1.rar";
/* Third argument is used to omit notice */
$arch = rar_open($file, null, 'retnull');
var_dump(rar_broken_is($arch));
?>
SEE ALSO
RarArchive::setAllowBroken.
PHP Documentation Group RAR_BROKEN_IS(3)
how would i go about having a index.php page in a folder, in the folder several files named greece.rar and france.rar and other countrys. could php get a list of these, put the names into a table, listed downwards, and the file-names clickable to open that file.? (2 Replies)
Using Lynx, when I try to download a .rar, it confirms I want to download and its got it as an appication/rar file.
However, split archives that end in .r## (.r00, .r01 ...) are not recognized as an appication/rar file and it reads the file like a .txt or .html.
How can I fix this?
Thanks! (2 Replies)
I work with multiple archive files, mostly rar. I understand the basics of rar and zip. I'm looking for a way to decompress multiple rar files with a single command. Hopefully each file would be unrared into dir with same name as archive. I normally just do this manually, but sometimes I'm... (2 Replies)
hello all
i have a big problems for me
if i have more files as example
test.ghrt.part01.rar
test.ghrt.part02.rar
test.ghrt.part03.rar
test.ghrt.part04.rar
test.ghrt.part05.rar
test.ghrt.part06.rar
test.ghrt.part07.rar
test.ghrt.part08.rar
test.ghrt.part09.rar
test.ghrt.part10.rar... (13 Replies)
Hi UNIX experts,
I am stuck on a task due to ignorance with bash and all those commands.
I have thousand of split archive files on a folder called downloads
Each file is named as below:
0001.part1.rar
0001.part2.rar
0001.part3.rar
0002.part1.rar
0002.part2.rar
0003.par1.rar... (5 Replies)
for media files in directory i want change every special char in name to "_" , create screenshots, get media information, then cat that info in 1 file, after that i want split (only) media files (not *.jpg,*.txt, etc.) with rar (including some file with info in each archive, and give each archive... (7 Replies)
Hi,
i need a shell tool to scan dir for *.rar Files, unrar ONLY the FIRST that was find, after complete Unrar delete all *.rar *.r** files in this folder and exit the script.
This script must be run at a cronjob on my debian lenny os.
Sorry for my bad Englisch. I hope you understand my... (6 Replies)
Good day all,
I am trying to install rar and unrar on fedora 16.
In terminal root, when I try to do :
# cp rar unrar /bin
I get the following error message:
cp: cannot stat `rar': No such file or directory
cp: cannot stat `unrar': No such file or directory
can anyone please... (7 Replies)
Hi,
I have this file in .rar format and need to use it on a suse linux system. I have transfered the file into the system and tried to unpack it using unrar command but i got this
l# unrar e Alarm.rar
UNRAR 3.51 freeware Copyright (c) 1993-2005 Alexander Roshal
??? - the file header... (5 Replies)
I Am connected to Whatbox.ca Seed Box Via SSH!!
i have a file named avicii.mp3. I Want to split it into two rar parts as Apart1.rar and Apart2.rar So That When i Download Both the parts to My PC And Extract Them They Come out As Whole Avicii.mp3.
There is also one more problem!! When I Rar A... (18 Replies)