RE: [PEAR-DEV] split out PEAR_PackageFileManager_File.php into a new package?

From: Date: Sat, 18 Oct 2003 18:56:25 +0000
Subject: RE: [PEAR-DEV] split out PEAR_PackageFileManager_File.php into a new package?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22797@lists.php.net to get a copy of this message
> From: Greg Beaver [mailto:greg@chiaraquartet.net] > Sent: Saturday, October 18, 2003 4:56 PM > The PEAR_PackageFileManager_File class in the PEAR_PackageFileManager > package has some useful routines for retrieving full listings of files > and directories, with the ability to selectively ignore based on > standard shell wildcards, and also soon to selectively include based on > wildcards. I replicate the code exactly in phpDocumentor, which leads > me to believe there may be other applications that need it. I checked > out File_Find, and although there is some similarity, I don't think the > purpose of finding a file describes at all what the code intends to do. > This code intends to simply grab a listing of every file in every > directory minus ignored files. The listing is returned as a sorted flat > array, allowing easy recursive processing without the need for a > recursive structure or recursive code, a huge speedup in PHP, thanks to > the magic of strnatcasecmp(). > > Basically, I'm wondering whether others would like to see this code > split off into a package, perhaps Directory_List since that is its > primary purpose, or File_List. If not, I'll just keep it where it is. Well if you are beginning to duplicate significant code then you should wonder if a new package should be created or an existing should be extended. The emphasis lies on significant. Of course this is a relative term :-) Genereally the idea was not to go all out on dependencies in PEAR. But if we are talking about a chunk of 3-5 methods with each 10-20 LOC I would say it should get its own package. If its just 10 LOC total then its probably not worth it. If its in between then it gets complicated :-) Regards, Lukas

« previous php.pear.dev (#22797) next »