cvs: peardoc /en/package/filesystem/archive-tar addString.xml addstring.xml
| From: | Philip Olson | Date: | Thu, 26 Jun 2003 15:45:45 +0000 |
| Subject: | cvs: peardoc /en/package/filesystem/archive-tar addString.xml addstring.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-1013@lists.php.net to get a copy of this message | ||
philip Thu Jun 26 11:45:45 2003 EDT
Added files:
/peardoc/en/package/filesystem/archive-tar addstring.xml
Removed files:
/peardoc/en/package/filesystem/archive-tar addString.xml
Log:
Renamed addString.xml to addstring.xml, documentation was written by Vincent Blavet.
Index: peardoc/en/package/filesystem/archive-tar/addstring.xml
+++ peardoc/en/package/filesystem/archive-tar/addstring.xml
<!-- $Revision: 1.1 $ -->
<refentry id="package.filesystem.archive-tar.addstring">
<refnamediv>
<refname>Archive_Tar::addString()</refname>
<refpurpose>add a string in the archive</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>
require_once 'Archive/Tar.php';
</funcsynopsisinfo>
<funcprototype>
<funcdef>boolean <function>addString</function></funcdef>
<paramdef>string <parameter>$filename</parameter></paramdef>
<paramdef>string <parameter>$content</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="package.filesystem.archive-tar.addstring.desc">
&title.desc;
<para>
This method adds the string <parameter>
content</parameter> in the archive like a file with full filename <parameter>
filename</parameter>.
</para>
<para>
If the archive does not exists it attempts to create it.
</para>
</refsect1>
<refsect1 id="package.filesystem.archive-tar.addstring.parameter">
&title.param;
<para>
<itemizedlist>
<listitem>
<para>
<parameter>string $filename</parameter> -
the path and filename that will be associated with the added string
in the archive.
</para>
</listitem>
<listitem>
<para>
<parameter>string $content</parameter> -
the string to add in the archive as a file.
</para>
</listitem>
</itemizedlist>
</para>
</refsect1>
<refsect1 id="package.filesystem.archive-tar.addstring.return">
&title.returns;
<para>
<parameter>boolean</parameter> - &return.success;
</para>
</refsect1>
<refsect1 id="package.filesystem.archive-tar.addstring.throws">
&title.throws;
<para>
<table>
<title>&title.throws.errortable;</title>
<tgroup cols="4">
<thead>
<row>
<entry>Error code</entry>
<entry>Error message</entry>
<entry>Reason</entry>
<entry>Solution</entry>
</row>
</thead>
<tbody>
<row>
<entry>null</entry>
<entry>
<quote>Unable to open in write mode <parameter>file
name</parameter></quote>
</entry>
<entry>
The file permissions for an existing file do not allow
writing or the file is locked.
</entry>
<entry>
Check permissions and possible competive programs using
the file.
</entry>
</row>
<row>
<entry>null</entry>
<entry>
<quote>Unable to open file <parameter>filename</parameter>in binary read
mode</quote>
</entry>
<entry>
The file to add to the archive could not be read.
</entry>
<entry>
Check for typing mistakes in the function argument and file
permissions.
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 id="package.filesystem.archive-tar.addstring.note">
&title.note;
¬e.notstatic;
</refsect1>
<refsect1 id="package.filesystem.archive-tar.addstring.example">
&title.example;
<example>
<title>Add a string in a compressed archive</title>
<programlisting role="php">
<![CDATA[
$tar_object = new Archive_Tar("tarname.tgz");
$content = "this file was generated from a string";
$tar_object->addString("data/readme.txt", $content);
// A file is created in the archive with name :
// data/readme.txt
]]>
</programlisting>
</example>
</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
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../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
-->