News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Using Introspective Methods with the DirectoryIterator Class in PHP 5
September 26, 2006 @ 07:47:25

DevShed continues their look at the DirectoryItertaor class in PHP 5 with part three posted today, a look at using the introspective methods to find out information about things like if a file can be read or not and what its permissions are.

This class still has some additional methods that require special attention. For this reason, this last tutorial of the series will be focused mostly on covering all the methods related to performing some kind of introspective process, which can be quite useful when analyzing the types and permissions of each entry included in a given directory.

They go through the functionality, pointing out the functions to check:

  • if an entry is a directory or not
  • if an entry is a "dot" or not ("." or ":")
  • if the entry can be executed/read/written to
  • to grab the permissions and the type of the entry
And, of course, there is code to go with each example, making it easy to pick out the parts you'd find useful and include them in your own code.

0 comments voice your opinion now!
dircetoryiterator class php5 introspective method dircetoryiterator class php5 introspective method


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Compressing JPEG images with JPEG Reducer

David Coallier's Blog: Namespaces part 4.1 (What namespaces don't fix (part 1))

DevShed: Keeping Track of Objects when Using Destructors in PHP 5

DZone.com: PHPSpec: BDD for your classes

Jaisen Methai's Blog: Stop including class files and use __autoload() instead


Community Events





Don't see your event here?
Let us know!


podcast language interview symfony2 laravel testing refactor developer list install framework threedevsandamaybe introduction release series unittest opinion community experience code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework