dir
mixed dir(string dir) A pseudo-object-oriented wrapper for many of the directory functions.
Returns:
Resource pointer on success; FALSE for other cases
Description:
dir() is a pseudo-object-oriented wrapper for all the directory functions that work with directory streams. It is certainly one of PHP’s oddball functions—an early experiment in implementing object-oriented features for PHP. (See the notes for an anecdote from Jim Winstead, the author of the function.)
When the function is called, it opens a directory stream to directory dir and returns an object. When the directory stream is opened, a resource pointer for the stream is created. This pointer is stored as a class property called handle and the pathname of the directory is stored ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access