reference/dir/functions/opendir.xml
b0b19b66183b28cebc1ffbcf1e2b8763f9d9c7b3
...
...
@@ -10,9 +10,9 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>resource</type><methodname>opendir</methodname>
14
-
<methodparam><type>string</type><parameter>path</parameter></methodparam>
15
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
13
+
<type class="union"><type>resource</type><type>false</type></type><methodname>opendir</methodname>
14
+
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
Opens up a directory handle to be used in subsequent
...
...
@@ -26,7 +26,7 @@
26
26
<para>
27
27
<variablelist>
28
28
<varlistentry>
29
-
<term><parameter>path</parameter></term>
29
+
<term><parameter>directory</parameter></term>
30
30
<listitem>
31
31
<para>
32
32
The directory path that is to be opened
...
...
@@ -50,52 +50,41 @@
50
50
<refsect1 role="returnvalues">
51
51
&reftitle.returnvalues;
52
52
<para>
53
-
Returns a directory handle <type>resource</type> on success, or
54
-
&false; on failure.
53
+
Returns a directory handle <type>resource</type> on success,
54
+
&return.falseforfailure;
55
55
</para>
56
+
</refsect1>
57
+

58
+
<refsect1 role="errors">
59
+
&reftitle.errors;
60
+
&fs.emits.warning.on.failure;
56
61
<para>
57
-
If <parameter>path</parameter> is not a valid directory or the
58
-
directory can not be opened due to permission restrictions or
59
-
filesystem errors, <function>opendir</function> returns &false; and
60
-
generates a PHP error of level <link linkend="errorfunc.constants">
61
-
E_WARNING</link>. You can suppress the error output of
62
-
<function>opendir</function> by prepending
63
-
'<link linkend="language.operators.errorcontrol">@</link>' to the
64
-
front of the function name.
62
+
This may happen if <parameter>directory</parameter> is not a valid directory,
63
+
the directory can not be opened due to permission restrictions,
64
+
or due to filesystem errors.
65
65
</para>
66
66
</refsect1>
67
67

68
68
<refsect1 role="changelog">
69
69
&reftitle.changelog;
70
-
<para>
71
-
<informaltable>
72
-
<tgroup cols="2">
73
-
<thead>
74
-
<row>
75
-
<entry>&Version;</entry>
76
-
<entry>&Description;</entry>
77
-
</row>
78
-
</thead>
79
-
<tbody>
80
-
<row>
81
-
<entry>5.0.0</entry>
82
-
<entry>
83
-
<parameter>path</parameter> supports the <literal>ftp://</literal>
84
-
URL wrapper.
85
-
</entry>
86
-
</row>
87
-
<row>
88
-
<entry>4.3.0</entry>
89
-
<entry>
90
-
<parameter>path</parameter> can also be any URL which supports
91
-
directory listing, however only the <literal>file://</literal>
92
-
URL wrapper supports this in PHP 4
93
-
</entry>
94
-
</row>
95
-
</tbody>
96
-
</tgroup>
97
-
</informaltable>
98
-
</para>
70
+
<informaltable>
71
+
<tgroup cols="2">
72
+
<thead>
73
+
<row>
74
+
<entry>&Version;</entry>
75
+
<entry>&Description;</entry>
76
+
</row>
77
+
</thead>
78
+
<tbody>
79
+
<row>
80
+
<entry>8.0.0</entry>
81
+
<entry>
82
+
<parameter>context</parameter> is now nullable.
83
+
</entry>
84
+
</row>
85
+
</tbody>
86
+
</tgroup>
87
+
</informaltable>
99
88
</refsect1>
100
89

101
90
<refsect1 role="examples">
...
...
@@ -145,7 +134,6 @@ filename: cli : filetype: dir
145
134
</para>
146
135
</refsect1>
147
136
</refentry>
148
-

149
137
<!-- Keep this comment at the end of the file
150
138
Local variables:
151
139
mode: sgml
152
140