Using DRF - Directory Recursive Files

Using inside Eclipse

Select a Project

Select a project in Eclipse (your project) -> right click -> select Properties

Add Libraries

Select "Java Build Path" -> Click next on "Libraries" Tab

Add External JARs

Click on "Add External JARs"

Add DRF jar file

Browse your file system and add "fr.iipt.ka.drf_directory_recursive_files-x.x.jar

Note :
When you download DRF library it's normally gzipped or zipped. Begin by Gunzipped or Unzipped the file

tar -zxvf drv.gz

OK to Finish

Now that the jar is added to your project -> click on "OK"

Add Imports to Your Class

In any new created or existing class in your project add these two imports

Use the library "Main Class"

Ready to use classes in the DRF library begin with Tfind, you have one general use class, and two other more specialled classes.
Here in the example "TFindAllFilesRecursiveWithToken" JavaDoc and Sources are included in DRF package

New in version 0.5

In this version searching files with conditions is possible. And it's possible to limit searching to root directory.

(I.e you can search and found only files with some extensions, or a string in the name of files, or files that have token in their text, or files that have the three conditions all together )

public TFindAllFilesRecursive(File rootDir,
String[] extensions,
String stringInName,
String token,
boolean recursiveSearch)


An example of construction
Searching for .html files only

String[] extensions={".html"};

TFindAllFilesRecursive t=new TFindAllFilesRecursive(new File("/home/kas/css_test"),extensions,null,null,true);

Enjoy :)