[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] svn: /phpdoc/en/trunk/reference/rar/ functions/rar-entry-get.xml functions/rar-list.xml ra
From: Gustavo_André_dos_Santos_Lopes <cataphract () php ! net>
Date: 2009-11-25 11:20:16
Message-ID: svn-cataphract-1259148016-291302-1948148612 () svn ! php ! net
[Download RAW message or body]
cataphract Wed, 25 Nov 2009 11:20:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291302
Log:
Added documentation for RarEntry::isDirectory.xml() and few other minor changes.
Changed paths:
U phpdoc/en/trunk/reference/rar/functions/rar-entry-get.xml
U phpdoc/en/trunk/reference/rar/functions/rar-list.xml
U phpdoc/en/trunk/reference/rar/rarentry/getname.xml
UU phpdoc/en/trunk/reference/rar/rarentry/getstream.xml
A phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml
U phpdoc/en/trunk/reference/rar/rarentry.xml
U phpdoc/en/trunk/reference/rar/versions.xml
["svn-diffs-291302.txt" (text/x-diff)]
Modified: phpdoc/en/trunk/reference/rar/functions/rar-entry-get.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/functions/rar-entry-get.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/functions/rar-entry-get.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -14,7 +14,7 @@
<methodparam><type>string</type><parameter>entry_name</parameter></methodparam>
</methodsynopsis>
<para>
- Get entry object from the Rar archive.
+ Get entry object (file or directory) from the Rar archive.
</para>
</refsect1>
Modified: phpdoc/en/trunk/reference/rar/functions/rar-list.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/functions/rar-list.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/functions/rar-list.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -13,7 +13,7 @@
<methodparam><type>resource</type><parameter>rar_file</parameter></methodparam>
</methodsynopsis>
<para>
- Get entries list from the Rar archive.
+ Get entries list (files and directories) from the Rar archive.
</para>
</refsect1>
Modified: phpdoc/en/trunk/reference/rar/rarentry/getname.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/rarentry/getname.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/rarentry/getname.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -16,7 +16,7 @@
</methodsynopsis>
</classsynopsis>
<para>
- <function>RarEntry::getName</function> returns full name of the archive entry.
+ <function>RarEntry::getName</function> returns the name (with path) of the archive entry.
</para>
</refsect1>
Modified: phpdoc/en/trunk/reference/rar/rarentry/getstream.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/rarentry/getstream.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/rarentry/getstream.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -1,97 +1,97 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision$ -->
-<refentry xml:id="function.rarentry-getstream" xmlns="http://docbook.org/ns/docbook">
- <refnamediv>
- <refname>RarEntry::getStream</refname>
- <refpurpose>Get file handler for entry.</refpurpose>
- </refnamediv>
-
- <refsect1 role="description">
- &reftitle.description;
- <classsynopsis>
- <ooclass><classname>RarEntry</classname></ooclass>
- <methodsynopsis>
- <type>string</type><methodname>getStream</methodname>
- <void/>
- </methodsynopsis>
- </classsynopsis>
- <para>
- <function>RarEntry::getStream</function> returns a file handler that
- supports read operations. This handler provides on-the-fly decompression
- for this entry.
- </para>
- <para>
- The handler is not invalidated by calling
- <function>rar_close</function>.
- </para>
- </refsect1>
-
- <refsect1 role="returnvalues">
- &reftitle.returnvalues;
- <para>
- The file handler &return.falseforfailure;.
- </para>
- </refsect1>
-
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- <title><function>RarEntry::getStream</function> example</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-
-$rar_file = rar_open('example.rar');
-if ($rar_file === false)
- die("Failed to open Rar archive");
-
-$entry = rar_entry_get($rar_file, 'Dir/file.txt');
-if ($entry === false)
- die("Failed to find such entry");
-
-$stream = $entry->getStream();
-if ($stream === false)
- die("Failed to obtain stream.");
-
-rar_close($rar_file); //stream is independent from file
-
-while (!feof($stream)) {
- $buff = fread($stream, 8192);
- if ($buff !== false)
- echo $buff;
- else
- break; //fread error
-}
-
-fclose($stream);
-
-?>
-]]>
- </programlisting>
- </example>
- </para>
- </refsect1>
-
-</refentry>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-indent-tabs-mode:nil
-sgml-parent-document:nil
-sgml-default-dtd-file:"~/.phpdoc/manual.ced"
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
-vim600: syn=xml fen fdm=syntax fdl=2 si
-vim: et tw=78 syn=sgml
-vi: ts=1 sw=1
--->
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $Revision$ -->
+<refentry xml:id="function.rarentry-getstream" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>RarEntry::getStream</refname>
+ <refpurpose>Get file handler for entry.</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <classsynopsis>
+ <ooclass><classname>RarEntry</classname></ooclass>
+ <methodsynopsis>
+ <type>string</type><methodname>getStream</methodname>
+ <void/>
+ </methodsynopsis>
+ </classsynopsis>
+ <para>
+ <function>RarEntry::getStream</function> returns a file handler that
+ supports read operations. This handler provides on-the-fly decompression
+ for this entry.
+ </para>
+ <para>
+ The handler is not invalidated by calling
+ <function>rar_close</function>.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ The file handler &return.falseforfailure;.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>RarEntry::getStream</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$rar_file = rar_open('example.rar');
+if ($rar_file === false)
+ die("Failed to open Rar archive");
+
+$entry = rar_entry_get($rar_file, 'Dir/file.txt');
+if ($entry === false)
+ die("Failed to find such entry");
+
+$stream = $entry->getStream();
+if ($stream === false)
+ die("Failed to obtain stream.");
+
+rar_close($rar_file); //stream is independent from file
+
+while (!feof($stream)) {
+ $buff = fread($stream, 8192);
+ if ($buff !== false)
+ echo $buff;
+ else
+ break; //fread error
+}
+
+fclose($stream);
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/en/trunk/reference/rar/rarentry/getstream.xml
___________________________________________________________________
Added: svn:eol-style
+ native
Added: phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml (rev 0)
+++ phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- $Revision$ -->
+<refentry xml:id="function.rarentry-isdirectory" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>RarEntry::isDirectory</refname>
+ <refpurpose>Test whether an entry represents a directory</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <classsynopsis>
+ <ooclass><classname>RarEntry</classname></ooclass>
+ <methodsynopsis>
+ <type>bool</type><methodname>isDirectory</methodname>
+ <void/>
+ </methodsynopsis>
+ </classsynopsis>
+ <para>
+ Test whether the entry is a directory.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns &true; if this entry is a directory and &false; otherwise.
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <para>
+ This function is only available starting with version 2.0.0, but one can
+ also test whether an entry is a directory by checking if the bit 0x10 is set
+ in the entry attributes, like this:
+ <programlisting role="php">
+<![CDATA[
+<?php
+//...
+//Open file, get entry and store in variable $e...
+//...
+
+$isDirectory = (bool) ($e->getAttr() & 0x10);
+]]>
+ </programlisting>
+ </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Property changes on: phpdoc/en/trunk/reference/rar/rarentry/isDirectory.xml
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
Added: svn:eol-style
+ native
Modified: phpdoc/en/trunk/reference/rar/rarentry.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/rarentry.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/rarentry.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -10,7 +10,7 @@
<section xml:id="rarentry.intro">
&reftitle.intro;
<para>
- A Rar entry, representing a compressed file inside a Rar archive.
+ A Rar entry, representing a directory or a compressed file inside a Rar archive.
</para>
</section>
<!-- }}} -->
Modified: phpdoc/en/trunk/reference/rar/versions.xml
===================================================================
--- phpdoc/en/trunk/reference/rar/versions.xml 2009-11-25 11:00:12 UTC (rev 291301)
+++ phpdoc/en/trunk/reference/rar/versions.xml 2009-11-25 11:20:16 UTC (rev 291302)
@@ -16,6 +16,7 @@
<function name='RarEntry::getpackedsize' from='PECL rar >= 0.1'/>
<function name='RarEntry::getunpackedsize' from='PECL rar >= 0.1'/>
<function name='RarEntry::getversion' from='PECL rar >= 0.1'/>
+ <function name='RarEntry::isDirectory' from='PECL rar >= 2.0.0'/>
<function name='rar_close' from='PECL rar >= 0.1'/>
<function name='rar_list' from='PECL rar >= 0.1'/>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic