Add file:// section

Refactor ftp:// "supported" section.
Add mkdir/rmdir lines to all "supported" sections.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146388 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sara Golemon 2003-12-13 21:43:23 +00:00
parent 7c973e4d36
commit e45037c60d

View file

@ -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 @@ foreach(stream_get_meta_data($fp) as $response) {
<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 @@ foreach(stream_get_meta_data($fp) as $response) {
<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 @@ file_set_contents("php://filter/write=string.rot13/resource=example.txt","Hello
<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 @@ file_set_contents("php://filter/write=string.rot13/resource=example.txt","Hello
<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>