Rar::extract

(no version information, might be only in CVS)

Rar::extract -- Extract entry from the archive

Description

bool Rar::extract ( string dir [, string filepath] )

Rar::extract() extracts entry's data to the dir. It will create new file in the specified dir with the name identical to the entry's name. If parameter filepath is specified instead dir, Rar::extract() will extract entry's data to the specified file.

Przykład 1. Rar::extract() example

<?php

$rar_file
= rar_open('example.rar') or die("Failed to open Rar archive");

$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Failed to find such entry");

$entry->extract('/dir/to'); // create /dir/to/Dir/file.txt
$entry->extract(false, '/dir/to/new_name.txt'); // create /dir/to/new_name.txt

?>

Zwraca TRUE w przypadku sukcesu, FALSE w przypadku porażki.

Hosting by: Hurra Communications Sp. z o.o.
Generated: 2007-01-26 18:02:54