News Feed
Sections




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

Builder.com:
Search and map directory trees with ease using the right PHP class
June 23, 2006 @ 07:47:12

In this new tutorial from Builder.com today, they take file searing (on the local machine) to the next level and illustrate the use of the PEAR File_Find package.

[But] recursive functions are complex, messy things and most developers (including myself) don't really enjoy working with them. That's why, when my last project needed to scan a directory hierarchy for a particular file (a typical recursive-function task), I didn't even consider rolling my own code. Instead, I headed straight for PEAR and its File_Find class, which takes all the pain out of searching multi-level directory structures.

You'll need to have worked with PEAR before, as there's no installation instructions, but pulling it in and getting it working from there is a breeze. They include the code examples that you'll need to follow along, showing how to create the object, what the object's "tree" of files looks like (recursively too!), and how to send the object off searching for a particular file as defined with a perl-compatible regular expression.

0 comments voice your opinion now!
search map directory tree recursive pear package file_find search map directory tree recursive pear package file_find


blog comments powered by Disqus

Similar Posts

Benjamin Eberlei's Blog: Application Lifecycle Management & Deployment with PEAR & PHAR (revisited)

Christian Stocker's Blog: Upload Progress Meter finally in PECL

Lorenzo Alberton's Blog: PEAR::Pager - Navigation with Pager and AJAX (or simple Javascript)

Community News: Latest PEAR Releases for 06.25.2007

Lorenzo Alberton's Blog: Navigation Through Paragraphs in an Article


Community Events





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


bugfix install podcast developer introduction wordpress list release series language application library interview unittest laravel framework threedevsandamaybe community api configure

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