org.jboss.vfs.util
Class FileNameVirtualFileFilter
java.lang.Object
org.jboss.vfs.util.FileNameVirtualFileFilter
- All Implemented Interfaces:
- VirtualFileFilter
public class FileNameVirtualFileFilter
- extends Object
- implements VirtualFileFilter
Exclude virtual file by file name and path.
- Author:
- ales.justin@jboss.org
Field Summary |
protected org.jboss.logging.Logger |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.jboss.logging.Logger log
FileNameVirtualFileFilter
public FileNameVirtualFileFilter(Map<String,Set<String>> excludes)
accepts
public boolean accepts(VirtualFile file)
- Do we accept file.
If pathName contains any of the keys,
* if the value is null - then do exclude
* if value is not null - only exclude if it value contains simple name
- Specified by:
accepts
in interface VirtualFileFilter
- Parameters:
file
- the virtual file
- Returns:
- false if file is excluded by excludes map, true other wise
getPathName
protected String getPathName(VirtualFile file)
- Get the path name for the VirtualFile.
- Parameters:
file
- the virtual file
- Returns:
- the path name
Copyright © 2011 JBoss, A division of Red Hat, Inc. All Rights Reserved.