package com.tutego.insel.io.file;

import java.io.File;
import java.util.List;

public class FileFinderDemo
{
  public static void main( String[] args )
  {
    String path = new File( System.getProperty( "user.dir")).getParent();

    System.out.println( "Looking in path: " + path );
    
    List<File> files = FileFinder.find( path, "(.*\\.gif$)|(.*\\.jpg$)" );
    
    System.out.printf( "Found %d file%s.%n",
                       files.size(), files.size() == 1 ? "" : "s" );
    
    for ( File f : files )
      System.out.println( f.getAbsolutePath() );
  }
}
