note 129650 added to class.filesystemiterator
| From: | spamblocker1@yahoo | Date: | Thu, 11 Jul 2024 21:27:34 +0000 |
| Subject: | note 129650 added to class.filesystemiterator | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221421@lists.php.net to get a copy of this message | ||
Here's the difference between DirectoryIterator and FileSystemIterator.
FileSystemIterator extends DirectoryIterator, inheriting all of it's functionalities, but
extending it with additional options and features:
- Additional flags and options (e.g., FileSystemIterator::SKIP_DOTS to skip . and .. entries).
- Offers more control and flexibility over the iteration process.
- Suitable for more complex directory traversal requirements where additional control is needed.
So if you just need the contents of a directory, use DirectoryIterator.
If you need to do directory traversal, use FileSystemIterator.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.84.18 (proxied: 24.210.58.63)
----
Manual Page -- https://php.net/manual/en/class.filesystemiterator.php
Edit -- https://main.php.net/note/edit/129650
Del: integrated -- https://main.php.net/note/delete/129650/integrated
Del: useless -- https://main.php.net/note/delete/129650/useless
Del: bad code -- https://main.php.net/note/delete/129650/bad+code
Del: spam -- https://main.php.net/note/delete/129650/spam
Del: non-english -- https://main.php.net/note/delete/129650/non-english
Del: in docs -- https://main.php.net/note/delete/129650/in+docs
Del: other reasons-- https://main.php.net/note/delete/129650
Reject -- https://main.php.net/note/reject/129650
Search -- https://main.php.net/manage/user-notes.php