View Javadoc

1   package com.flexiblewebsolutions.xdriveunit.loadtest;
2   
3   import java.io.File;
4   import java.io.FilenameFilter;
5   
6   /***
7    * @author Donavon Buss
8    */
9   public class PrefixFilter implements FilenameFilter
10  {
11      private String _FilePrefix = null;
12  
13      public PrefixFilter( String pFilePrefix )
14      {
15          _FilePrefix = pFilePrefix;
16      }
17  
18      /***
19       * Only show files that match the format.
20       */
21      public boolean accept( File pDirectory, String pFileName )
22      {
23          if( pFileName.startsWith( _FilePrefix ) )
24          {
25              return true;
26          }
27          else
28          {
29              return false;
30          }
31      }
32  }