cvs: peardoc /en/core archive.xml

From: Date: Fri, 25 Jan 2002 00:50:13 +0000
Subject: cvs: peardoc /en/core archive.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2112@lists.php.net to get a copy of this message
alexmerz Thu Jan 24 19:50:13 2002 EDT Added files: /peardoc/en/core archive.xml Log: add Archive_Tar

Index: peardoc/en/core/archive.xml +++ peardoc/en/core/archive.xml <?xml encoding="iso-8859-1"?> <!-- $Id: archive.xml,v 1.1 2002/01/25 00:50:13 alexmerz Exp $ --> <reference id="core.archive"> <title>PEAR Archive</title> <titleabbrev>Functions for managing packed files and directories</titleabbrev> <partintro> <simpara> </simpara> </partintro> <refentry id="core.archive.tar"> <refnamediv> <refname>Tar</refname> <refpurpose>managing tar archives</refpurpose> </refnamediv> <refsect1 id="core.archive.tar.tar"> <title>Archive_Tar::Archive_Tar()</title> <funcsynopsis> <funcprototype> <funcdef>void <function>Archive_Tar</function></funcdef> <paramdef>string <parameter>$tarname</parameter></paramdef> <paramdef>boolean <parameter><optional>$compress</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> The constructor declare a new <classname>Archive_Tar</classname> object, identifying it by the name of the tar file. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$tarname</parameter> - the name of the tar archive to create </para> </listitem> <listitem> <para> <parameter>$compress</parameter> - if true, the archive will be gezip(ped). Default is <parameter>false</parameter>. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.create"> <title>Archive_Tar::create()</title> <funcsynopsis> <funcprototype> <funcdef>void <function>create</function></funcdef> <paramdef>array <parameter>$filelist</parameter></paramdef> </funcprototype> </funcsynopsis> <para> This method creates the archive file and add the listed files or directories. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a directory it is not replaced. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$filelist</parameter> - an array of filenames and directory names, or a single string with names separated by a single blank space. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.add"> <title>Archive_Tar::add()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>add</function></funcdef> <paramdef>array <parameter>$filelist</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Adds files to the archive </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$filelist</parameter> - An array of filenames and directory names, or a single string with names separated by a single blank space. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.extract"> <title>Archive_Tar::extract()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>extract</function></funcdef> <paramdef>array <parameter>$path</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Extracts the files to the archive into the given path </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$path</parameter> - the path to extract </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.listcontent"> <title>Archive_Tar::listContent()</title> <funcsynopsis> <funcprototype> <funcdef>array <function>listContent</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> <para> Lists the files of the archive </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>array</parameter> - a list of the files </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.addmodify"> <title>Archive_Tar::addModify()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>addModify</function></funcdef> <paramdef>array <parameter>$filelist</parameter></paramdef> <paramdef>string <parameter>$add_dir</parameter></paramdef> <paramdef>string <parameter><optional>$remove_dir</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This method add the files or directories listed in <parameter> filelist</parameter> at the end of the existing archive. If the archive does not yet exists it is created. If a file or directory is already in the archive it will only be added at the end of the archive. There is no update of the existing archived file or directory. However while extracting the archive, the last file will replace the first one. This results in a none optimization of the archive size. If a file or directory does not exists, it is ignored. If the resulting filename or directory name (after the add/remove option or not) string is greater than 99 char, the file or directory is ignored. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$filelist</parameter> - an array of filenames and directory names, or a single string with names separated by a single blank space. </para> <para> <parameter>$add_dir</parameter> - a string which contains a path to be added to the memorized path of each element in the list. </para> <para> <parameter>$remove_dir</parameter> - a string which contains a path to be removed from the memorized path of each element in the list, when relevant. Default is an empty string. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.createmodify"> <title>Archive_Tar::createModify()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>createModify</function></funcdef> <paramdef>array <parameter>$filelist</parameter></paramdef> <paramdef>string <parameter>$add_dir</parameter></paramdef> <paramdef>string <parameter><optional>$remove_dir</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This method creates the archive file and add the listed files or directories. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a directory it is not replaced. The path add/remove ability enables the user to prepare an archive for extraction in a different path than the origin files are. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$filelist</parameter> - an array of filenames and directory names, or a single string with names separated by a single blank space. </para> <para> <parameter>$add_dir</parameter> - a string which contains a path to be added to the memorized path of each element in the list. </para> <para> <parameter>$remove_dir</parameter> - a string which contains a path to be removed from the memorized path of each element in the list, when relevant. Default is an empty string. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.extractmodify"> <title>Archive_Tar::extractModify()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>extractModify</function></funcdef> <paramdef>string <parameter>$path</parameter></paramdef> <paramdef>string <parameter>$remove_path</parameter></paramdef> </funcprototype> </funcsynopsis> <para> This method extract all the content of the archive in the directory indicated by <parameter>$path</parameter>. When relevant the memorized path of the files or directories can be modified by removing the <parameter>$remove_path</parameter> path at the beginning of the file or directory path. While extracting a file, if the directory path does not exists it is created. While extracting a file, if the file already exists it is replaced without looking for last modification date. while extracting a file, if the file already exists and is write protected, the extraction is aborted. while extracting a file, if a directory with the same name already exists, the extraction is aborted. while extracting a directory, if a file with the same name already exists, the extraction is aborted. while extracting a file/directory if the destination directory exist and is write protected, or does not exist but can not be created, the extraction is aborted. If after extraction an extracted file does not show the correct stored file size, the extraction is aborted. In such cases, the result can be a partial extraction that may need to be manually cleaned. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$path</parameter> - the path of the directory where the files and/or directories need to by extracted. </para> <para> <parameter>$remove_path</parameter> - part of the memorized path that can be removed if present at the beginning of the files or directories path. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="core.archive.tar.extractlist"> <title>Archive_Tar::extractList()</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>extractList</function></funcdef> <paramdef>array <parameter>$filelist</parameter></paramdef> <paramdef>string <parameter>$path</parameter></paramdef> <paramdef>string <parameter><optional>$remove_path</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This method extract from the archive only the files indicated in the <parameter>$filelist</parameter>. These files are extracted in the current directory or in the directory indicated by the optional <parameter> $path</parameter> parameter. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$filelist</parameter> - an array of filenames and directory names, or a single string with names separated by a single blank space. </para> <para> <parameter>$path</parameter> - the path of the directory where the files and/or directory need to by extracted. </para> <para> <parameter>$remove_path</parameter> - part of the memorized path that can be removed if present at the beginning of the files or directories path. </para> </listitem> </itemizedlist> </para> <para> Returns <itemizedlist> <listitem> <para> <parameter>boolean</parameter> - <parameter>true</parameter> on success,<parameter>false</parameter> on error </para> </listitem> </itemizedlist> </para> </refsect1> </refentry> </reference> <!-- 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 -->
« previous php.pear.cvs (#2112) next »