Query::Directory Traversing
Posted: Tue May 18, 2004 5:08 pm
I have looked around the forums...
And I have looked around PHPClasses...
And I am stumped...
What I would LIKE is a Class that simply traverses Directories...
A PERFECT Class would be given a root directory...
And it would go through ALL of the folders and subfolders in those directories and return an array of $files.
$file['path'] would include the path to the file...
$file['name'] would be the name of the file...
etc... Each array key would hold a piece of file information...
I want to use this for a massive INCLUDE...
I want to be able to point to:
public_html/libraries/<libraryname>/classes
Then I want to include all files in THAT folder that start with:
class_*.php
This way I just name all of my class files ' class_<filename>.php ' and then I can tell it to grab the classes from a <certain library>... and voila!
Any help would be appreciated... Thanks...
And I have looked around PHPClasses...
And I am stumped...
What I would LIKE is a Class that simply traverses Directories...
A PERFECT Class would be given a root directory...
And it would go through ALL of the folders and subfolders in those directories and return an array of $files.
$file['path'] would include the path to the file...
$file['name'] would be the name of the file...
etc... Each array key would hold a piece of file information...
I want to use this for a massive INCLUDE...
I want to be able to point to:
public_html/libraries/<libraryname>/classes
Then I want to include all files in THAT folder that start with:
class_*.php
This way I just name all of my class files ' class_<filename>.php ' and then I can tell it to grab the classes from a <certain library>... and voila!
Any help would be appreciated... Thanks...