cvs: peardoc /en/packages/file archive-tar.xml
| From: | Vincent Blavet | Date: | Thu, 09 May 2002 13:39:18 +0000 |
| Subject: | cvs: peardoc /en/packages/file archive-tar.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3730@lists.php.net to get a copy of this message | ||
vblavet Thu May 9 09:39:18 2002 EDT
Modified files:
/peardoc/en/packages/file archive-tar.xml
Log:
* Adding examples to explain the support of windows path format
Index: peardoc/en/packages/file/archive-tar.xml
diff -u peardoc/en/packages/file/archive-tar.xml:1.10 peardoc/en/packages/file/archive-tar.xml:1.11
--- peardoc/en/packages/file/archive-tar.xml:1.10 Fri Apr 19 09:25:01 2002
+++ peardoc/en/packages/file/archive-tar.xml Thu May 9 09:39:17 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<refentry id="packages.file.archive-tar">
<refnamediv>
<refname>Archive_Tar</refname>
@@ -406,7 +406,7 @@
// install/data/... all the files and sub-dirs of data/
// install/file.log
]]>
- </programlisting>
+ </programlisting>
</example>
<example>
<title>addModify()</title>
@@ -424,8 +424,31 @@
// install/data/... all the files and sub-dirs of data/
// install/log/file.log
]]>
- </programlisting>
+ </programlisting>
</example>
+ <example>
+ <title>addModify()</title>
+ <programlisting role="php">
+ <![CDATA[
+$tar_object = new Archive_Tar("tarname.tar");
+$v_list[0]="d:\dev\file.txt";
+$v_list[1]="d:\dev\data\";
+$v_list[2]="d:\log\file.log";
+$tar_object->addModify($v_list, "install/temp", "d:\dev");
+// files are stored in the archive as :
+// install/temp/file.txt
+// install/temp/data
+// install/temp/data/file1.txt
+// install/temp/data/... all the files and sub-dirs of data/
+// install/temp/log/file.log
+ ]]>
+ </programlisting>
+ </example>
+ <para>
+ Under windows system, windows path format can be used. However if the files are
+ using windows path, the $remove_dir parameter must be in windows path format.
+ The $add_dir parameter can be in windows or unix path format.
+ </para>
</refsect1>
<refsect1 id="packages.file.archive-tar.createmodify">
@@ -503,7 +526,26 @@
// install/data/... all the files and sub-dirs of data/
// install/log/file.log
]]>
- </programlisting>
+ </programlisting>
+ </example>
+ <example>
+ <title>createModify()</title>
+ <programlisting role="php">
+ <![CDATA[
+$tar_object = new Archive_Tar("tarname.tgz", true);
+$tar_object->setErrorHandling(PEAR_ERROR_PRINT);
+$v_list[0]="c:\dev\file.txt";
+$v_list[1]="c:\dev\data\";
+$v_list[2]="c:\log\file.log";
+$tar_object->createModify($v_list, "install/temp", "c:\dev");
+// files are stored in the archive as :
+// install/temp/file.txt
+// install/temp/data
+// install/temp/data/file1.txt
+// install/temp/data/... all the files and sub-dirs of data/
+// install/temp/log/file.log
+ ]]>
+ </programlisting>
</example>
</refsect1>
@@ -591,8 +633,32 @@
// install/data/log.txt
// install/readme.txt
]]>
- </programlisting>
+ </programlisting>
</example>
+ <example>
+ <title>extractModify()</title>
+ <programlisting role="php">
+ <![CDATA[
+// tarname.tar with files :
+// dev/data/file.txt
+// dev/data/log.txt
+// readme.txt
+
+$tar_object = new Archive_Tar("tarname.tar");
+$tar_object->extractModify("d:\install\temp", "dev");
+
+// Files will be extracted there :
+// d:\install\temp\data\file.txt
+// d:\install\temp\data\log.txt
+// d:\install\temp\readme.txt
+ ]]>
+ </programlisting>
+ </example>
+ <para>
+ Under a windows system, the windows path format 'd:\path\dir' can be used
+ in the $add_dir parameter. It can never be used in the $remove_dir parameter
+ which must match the stored path inside the archive.
+ </para>
</refsect1>
<refsect1 id="packages.file.archive-tar.extractlist">
@@ -664,7 +730,7 @@
// install/data/file.txt
// install/readme.txt
]]>
- </programlisting>
+ </programlisting>
</example>
</refsect1>
@@ -687,4 +753,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
+-->
\ No newline at end of file