cvs: phpdoc /en/functions dir.xml

From: Date: Sat, 18 Aug 2001 14:07:43 +0000
Subject: cvs: phpdoc /en/functions dir.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969337155@lists.php.net to get a copy of this message
goba Sat Aug 18 10:07:43 2001 EDT Modified files: /phpdoc/en/functions dir.xml Log: WS fixes Index: phpdoc/en/functions/dir.xml diff -u phpdoc/en/functions/dir.xml:1.18 phpdoc/en/functions/dir.xml:1.19 --- phpdoc/en/functions/dir.xml:1.18 Thu Aug 2 13:36:55 2001 +++ phpdoc/en/functions/dir.xml Sat Aug 18 10:07:43 2001 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.18 $ --> +<!-- $Revision: 1.19 $ --> <reference id="ref.dir"> <title>Directory functions</title> <titleabbrev>Directories</titleabbrev> @@ -62,26 +62,26 @@ <title>Description</title> <funcsynopsis> <funcprototype> - <funcdef>new <function>dir</function></funcdef> + <funcdef>object <function>dir</function></funcdef> <paramdef>string <parameter>directory</parameter></paramdef> </funcprototype> </funcsynopsis> <para> A pseudo-object oriented mechanism for reading a directory. The given <parameter>directory</parameter> is opened. Two properties - are available once directory has been opened. The handle + are available once the directory has been opened. The handle property can be used with other directory functions such as <function>readdir</function>, <function>rewinddir</function> and <function>closedir</function>. The path property is set to path the directory that was opened. Three methods are available: read, rewind and close. <example> - <title><function>dir</function> Example</title> + <title><function>dir</function> example</title> <programlisting role="php"> $d = dir("/etc"); echo "Handle: ".$d->handle."&lt;br>\n"; echo "Path: ".$d->path."&lt;br>\n"; -while($entry=$d->read()) { +while ($entry = $d->read()) { echo $entry."&lt;br>\n"; } $d->close(); @@ -159,12 +159,12 @@ </para> <para> <example> - <title><function>opendir</function> Example</title> + <title><function>opendir</function> example</title> <programlisting role="php"> &lt;?php if ($dir = @opendir("/tmp")) { - while($file = readdir($dir)) { + while ($file = readdir($dir)) { echo "$file\n"; } closedir($dir); @@ -201,7 +201,7 @@ $handle=opendir('.'); echo "Directory handle: $handle\n"; echo "Files:\n"; -while (($file = readdir($handle))!==false) { +while (false !== ($file = readdir($handle))) { echo "$file\n"; } closedir($handle); @@ -221,8 +221,8 @@ </title> <programlisting role="php"> &lt;?php -$handle=opendir('.'); -while (false!==($file = readdir($handle))) { +$handle = opendir('.'); +while (false !== ($file = readdir($handle))) { if ($file != "." &amp;&amp; $file != "..") { echo "$file\n"; }

« previous php.doc (#969337155) next »