<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- 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. </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 -->