org.codehaus.spice.salt.io
Class PathMatcher

java.lang.Object
  extended by org.codehaus.spice.salt.io.PathMatcher

public class PathMatcher
extends Object

Utility class for scanning a filesystem and matching a particular set of include and exclude patterns ala ant.

Version:
$Revision: 1.2 $ $Date: 2004/07/11 23:42:28 $
Author:
Peter Donald

Constructor Summary
PathMatcher(String[] includes, String[] excludes)
          Construct a matcher from ant style includes/excludes.
PathMatcher(String[] includes, String[] excludes, char separator)
          Construct a matcher from ant style includes/excludes.
 
Method Summary
 boolean match(String vPath)
          Test if a virtual path matches any of the ant style patterns specified in this objects constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathMatcher

public PathMatcher(String[] includes,
                   String[] excludes)
Construct a matcher from ant style includes/excludes.

Parameters:
includes - the set of includes
excludes - the set of excludes

PathMatcher

public PathMatcher(String[] includes,
                   String[] excludes,
                   char separator)
Construct a matcher from ant style includes/excludes.

Parameters:
includes - the set of includes
excludes - the set of excludes
separator - the separator used to mark end of elements
Method Detail

match

public boolean match(String vPath)
Test if a virtual path matches any of the ant style patterns specified in this objects constructor.

Parameters:
vPath - the virtual path string
Returns:
true if matches, false otherwise


Copyright © 1999-2012 Codehaus. All Rights Reserved.