Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rar_close(3) [php 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)

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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting .rar files

Hi, Can someone throw light on opening a .rar file? thanks, sskb (5 Replies)
Discussion started by: sskb
5 Replies

2. Shell Programming and Scripting

PHP: list into tables

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)
Discussion started by: perleo
2 Replies

3. UNIX for Dummies Questions & Answers

Lynx - Downloading - extension handling - changing mime type?

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)
Discussion started by: yitzle
2 Replies

4. UNIX for Dummies Questions & Answers

Unrar Multiple Files with Command

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)
Discussion started by: dobbs
2 Replies

5. UNIX for Dummies Questions & Answers

rename more files special case

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)
Discussion started by: ateya
13 Replies

6. UNIX for Dummies Questions & Answers

How can i open rar files

Is there a way to open rar files on linux i would really appretiate if u would help :) (2 Replies)
Discussion started by: abu_malek
2 Replies

7. UNIX for Dummies Questions & Answers

Help with rar

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)
Discussion started by: farneville
5 Replies

8. Debian

How to Excluding Extensions Creating RAR & Uploading it

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)
Discussion started by: sunnymuffin
7 Replies

9. Shell Programming and Scripting

Autounrar Script for Debian

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)
Discussion started by: lammy
6 Replies

10. Solaris

Extract .rar format files in Solaris

Hi All, Is there way to extract the .rar format files in Solaris Thanks, Mani Muthu (3 Replies)
Discussion started by: k_manimuthu
3 Replies

11. UNIX for Dummies Questions & Answers

Remove all lines that contain ".rar"

How do I use bash to remove all lines that contain the string ".rar" from a file? (3 Replies)
Discussion started by: locoroco
3 Replies

12. UNIX for Dummies Questions & Answers

Unzip a .rar file

Hi, How to unzip a .rar file in unix. I tried unrar command but it doesnt work. Any help will be appreciated Thanks (10 Replies)
Discussion started by: irudayaraj
10 Replies

13. Fedora

Problem installing rar and unrar

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)
Discussion started by: peter_071
7 Replies

14. UNIX for Dummies Questions & Answers

Using a rar file on a suse linux

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)
Discussion started by: mena
5 Replies

15. UNIX for Dummies Questions & Answers

How To Split A File In Two Rar Parts?

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)
Discussion started by: anime12345
18 Replies