1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- Author: Wez Furlong <wez@thebrainroom.com>
Please contact me before making any major amendments to the
content of this section. Splitting/Merging are fine if they are
required for php-doc restructuring purposes - just drop me a line
if you make a change (so I can update my local copy).
-->
<sect1 id="streams.dir-api">
<title>Streams Dir API Reference</title>
<para>
The functions listed in this section work on local files, as well as remote files
(provided that the wrapper supports this functionality!).
</para>
<refentry id="streams.php-stream-opendir">
<refnamediv>
<refname>php_stream_opendir</refname>
<refpurpose>Open a directory for file enumeration</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>php_stream *</type><methodname>php_stream_opendir</methodname>
<methodparam><type>char *</type><parameter>path</parameter></methodparam>
<methodparam><type>php_stream_context *</type><parameter>context</parameter></methodparam>
</methodsynopsis>
<para>
<function>php_stream_opendir</function> returns a stream that can be used to list the
files that are contained in the directory specified by <parameter>path</parameter>.
This function is functionally equivalent to POSIX <function>opendir</function>.
Although this function returns a php_stream object, it is not recommended to
try to use the functions from the common API on these streams.
</para>
</refsect1>
</refentry>
<refentry id="streams.php-stream-readdir">
<refnamediv>
<refname>php_stream_readdir</refname>
<refpurpose>Fetch the next directory entry from an opened dir</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>php_stream_dirent *</type><methodname>php_stream_readdir</methodname>
<methodparam><type>php_stream *</type><parameter>dirstream</parameter></methodparam>
<methodparam><type>php_stream_dirent *</type><parameter>ent</parameter></methodparam>
</methodsynopsis>
<para>
<function>php_stream_readdir</function> reads the next directory entry
from <parameter>dirstream</parameter> and stores it into <parameter>ent</parameter>.
If the function succeeds, the return value is <parameter>ent</parameter>.
If the function fails, the return value is NULL.
See <link linkend="streams.struct-php-stream-dirent">php_stream_dirent</link> for more
details about the information returned for each directory entry.
</para>
</refsect1>
</refentry>
<refentry id="streams.php-stream-rewinddir">
<refnamediv>
<refname>php_stream_rewinddir</refname>
<refpurpose>Rewind a directory stream to the first entry</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>php_stream_rewinddir</methodname>
<methodparam><type>php_stream *</type><parameter>dirstream</parameter></methodparam>
</methodsynopsis>
<para>
<function>php_stream_rewinddir</function> rewinds a directory stream to the first entry.
Returns 0 on success, but -1 on failure.
</para>
</refsect1>
</refentry>
<refentry id="streams.php-stream-closedir">
<refnamediv>
<refname>php_stream_closedir</refname>
<refpurpose>Close a directory stream and release resources</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>php_stream_closedir</methodname>
<methodparam><type>php_stream *</type><parameter>dirstream</parameter></methodparam>
</methodsynopsis>
<para>
<function>php_stream_closedir</function> closes a directory stream and releases
resources associated with it.
Returns 0 on success, but -1 on failure.
</para>
</refsect1>
</refentry>
</sect1>
<!-- 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
indent-tabs-mode:nil
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
-->
|