readdirRead entry from directory handle
&reftitle.description;
stringfalsereaddirresourcenulldir_handle&null;
Returns the name of the next entry in the directory. The
entries are returned in the order in which they are stored by
the filesystem.
&reftitle.parameters;
dir_handle
The directory handle resource previously opened
with opendir. If the directory handle is
not specified, the last link opened by opendir
is assumed.
&reftitle.returnvalues;
Returns the entry name on success&return.falseforfailure;.
&return.falseproblem;
&reftitle.changelog;
&Version;&Description;8.0.0dir_handle is now nullable.
&reftitle.examples;
List all entries in a directory
Please note the fashion in which readdir's
return value is checked in the examples below. We are explicitly
testing whether the return value is identical to (equal to and of
the same type as--see Comparison
Operators for more information) &false; since otherwise,
any directory entry whose name evaluates to &false; will stop the
loop (e.g. a directory named "0").
]]>
List all entries in the current directory and strip out .
and ..
]]>
&reftitle.seealso;
is_dirglobopendirscandir