Login   Register  
PHP Classes
elePHPant
Icontem

Class Grep Search: Search files in directories like grep

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-08-20 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 668 All time: 4,430 This week: 1,572Up
Version License PHP version Categories  
classgrepsearch 1.0GNU General Public Lice...5.0PHP 5, Files and Folders, Searching
Description Author  

This class can be used to search files in directories like the Unix command grep.

It can traverse a given directory recursively and search for a given text the contents of files with a given list of file name extensions.

The path of the files that have the given text is stored in a class array variable and the class returns the number of occurrences.

The idea of the class was inspired on the Grep Simulator class written by Er. Rochak Chauhan.

Picture of Cinu Chacko
Name: Cinu Chacko <contact>
Classes: 1 package by
Country: India India
Age: 39
All time rank: 2591165 in India India
Week rank: 1721 Up113 in India India Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file 11.txt Data example text files
Plain text file ClassGrepSearch.inc.php Class Main Class
Accessible without login Plain text file exampleSearch.php Example Called from exampleSearchForm.php which executes the commands
Accessible without login Plain text file exampleSearchCustomFunctions.php Aux. Customizable Functions used with the Search.
Accessible without login Plain text file exampleSearchForm.php Example Main form which starts the demo.
Accessible without login Plain text file getFileContents.php Aux. Display file contents.
Accessible without login Plain text file readme.txt Doc. Class Documentation and License

 Version Control Unique User Downloads Download Rankings  
 0%Total:668All time:4,430
 This week:0This week:1,572Up
 User Comments (1)