pollita Sat Dec 13 16:43:23 2003 EDT
Modified files:
/phpdoc/en/appendices wrappers.xml
Log:
Add file:// section
Refactor ftp:// "supported" section.
Add mkdir/rmdir lines to all "supported" sections.
Index: phpdoc/en/appendices/wrappers.xml
diff -u phpdoc/en/appendices/wrappers.xml:1.30 phpdoc/en/appendices/wrappers.xml:1.31
--- phpdoc/en/appendices/wrappers.xml:1.30 Fri Dec 12 18:20:17 2003
+++ phpdoc/en/appendices/wrappers.xml Sat Dec 13 16:43:23 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.30 $ -->
+<!-- $Revision: 1.31 $ -->
<appendix id="wrappers">
<title>List of Supported Protocols/Wrappers</title>
<para>
@@ -11,6 +11,90 @@
<function>stream_wrapper_register</function>.
</para>
+ <section id="wrappers.file">
+ <title>Filesystem</title>
+ <simpara>All versions of PHP. Explicitly using <filename>file://</filename> since
<literal>PHP 4.3.0</literal></simpara>
+
+ <itemizedlist>
+ <listitem><simpara><filename>/path/to/file.ext</filename></simpara></listitem>
+
<listitem><simpara><filename>relative/path/to/file.ext</filename></simpara></listitem>
+ <listitem><simpara><filename>fileInCwd.ext</filename></simpara></listitem>
+ <listitem><simpara><filename>C:/path/to/winfile.ext</filename></simpara></listitem>
+ <listitem><simpara><filename>C:\path\to\winfile.ext</filename></simpara></listitem>
+
<listitem><simpara><filename>\\smbserver\share\path\to\winfile.ext</filename></simpara></listitem>
+
<listitem><simpara><filename>file:///path/to/file.ext</filename></simpara></listitem>
+ </itemizedlist>
+
+ <simpara>
+ <filename>file://</filename> is the default wrapper used with PHP and represents
the local filesystem.
+ When a relative path is specified (a path which does not begin with /, \, \\, or a
windows drive letter)
+ the path provided will be applied against the current working directory. In many
cases this is the
+ directory in which the script resides unless it has been changed. Using the CLI
sapi, this defaults
+ to the directory from which the script was called.
+ </simpara>
+
+ <simpara>
+ With some functions, such as <function>fopen</function> and
<function>file_get_contents</function>,
+ <literal>include_path</literal> may be optionally searched for relative paths as
well.
+ </simpara>
+
+ <para>
+ <table>
+ <title>Wrapper Summary</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Supported</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Restricted by <literal>allow_url_fopen</literal>.</entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry>Allows Reading</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Allows Writing</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Allows Appending</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Allows Simultaneous Reading and Writing</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>stat</function></entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>unlink</function></entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rename</function></entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>mkdir</function></entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rmdir</function></entry>
+ <entry>Yes</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </section>
+
<section id="wrappers.http">
<title>HTTP and HTTPS</title>
<simpara>PHP 3, PHP 4. <filename>https://</filename> since <literal>PHP
4.3.0</literal></simpara>
@@ -120,6 +204,14 @@
<entry>Supports <function>rename</function></entry>
<entry>No</entry>
</row>
+ <row>
+ <entry>Supports <function>mkdir</function></entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rmdir</function></entry>
+ <entry>No</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -246,49 +338,68 @@
<para>
<table>
<title>Wrapper Summary</title>
- <tgroup cols="2">
+ <tgroup cols="3">
<thead>
<row>
<entry>Attribute</entry>
- <entry>Supported</entry>
+ <entry><literal>PHP 4</literal></entry>
+ <entry><literal>PHP 5</literal></entry>
</row>
</thead>
<tbody>
<row>
<entry>Restricted by <literal>allow_url_fopen</literal>.</entry>
<entry>Yes</entry>
+ <entry>Yes</entry>
</row>
<row>
<entry>Allows Reading</entry>
<entry>Yes</entry>
+ <entry>Yes</entry>
</row>
<row>
<entry>Allows Writing</entry>
- <entry>
- Yes (Prior to <literal>PHP 5.0.0</literal>: new files only.
- <literal>PHP 5.0.0</literal> and later: overwrite allowed
- with context option)
- </entry>
+ <entry>Yes (new files only)</entry>
+ <entry>Yes (new files/existing files with
<parameter>overwrite</parameter>)</entry>
</row>
<row>
<entry>Allows Appending</entry>
- <entry>Yes (<literal>PHP 5.0.0</literal> or later)</entry>
+ <entry>No</entry>
+ <entry>Yes</entry>
</row>
<row>
<entry>Allows Simultaneous Reading and Writing</entry>
<entry>No</entry>
+ <entry>No</entry>
</row>
<row>
<entry>Supports <function>stat</function></entry>
<entry>No</entry>
+ <entry>
+ <function>filesize</function>, <function>filetype</function>,
+ <function>file_exists</function>, <function>is_file</function>,
+ and <function>is_dir</function> elements only.
+ </entry>
</row>
<row>
<entry>Supports <function>unlink</function></entry>
- <entry>Yes (<literal>PHP 5.0.0</literal> or later)</entry>
+ <entry>No</entry>
+ <entry>Yes</entry>
</row>
<row>
<entry>Supports <function>rename</function></entry>
- <entry>Yes (<literal>PHP 5.0.0</literal> or later)</entry>
+ <entry>No</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>mkdir</function></entry>
+ <entry>No</entry>
+ <entry>Yes</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rmdir</function></entry>
+ <entry>No</entry>
+ <entry>Yes</entry>
</row>
</tbody>
</tgroup>
@@ -523,6 +634,14 @@
<entry>Supports <function>rename</function></entry>
<entry>No</entry>
</row>
+ <row>
+ <entry>Supports <function>mkdir</function></entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rmdir</function></entry>
+ <entry>No</entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -604,6 +723,14 @@
<entry>Supports <function>rename</function></entry>
<entry>No</entry>
</row>
+ <row>
+ <entry>Supports <function>mkdir</function></entry>
+ <entry>No</entry>
+ </row>
+ <row>
+ <entry>Supports <function>rmdir</function></entry>
+ <entry>No</entry>
+ </row>
</tbody>
</tgroup>
</table>