org.ops4j.pax.url.dir.internal
Class FileTailImpl
java.lang.Object
org.ops4j.pax.url.dir.internal.FileTailImpl
- All Implemented Interfaces:
- FileTail
public class FileTailImpl
- extends java.lang.Object
- implements FileTail
Finds resources of the current module under test just by given top-level parent (whatever that is)
and name of the class under test using a narrowing approach.
- Since:
- May 30, 2008
- Author:
- Toni Menzel (tonit)
Field Summary |
static org.apache.commons.logging.Log |
logger
|
Constructor Summary |
FileTailImpl(java.io.File topLevelDir,
java.lang.String tailExpr)
|
Method Summary |
protected java.io.File |
findParentOfTail(java.io.File folder)
Tries to find the parent of tail in sub folders of folder parameter. |
java.io.File |
getParentOfTail()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
logger
public static final org.apache.commons.logging.Log logger
FileTailImpl
public FileTailImpl(java.io.File topLevelDir,
java.lang.String tailExpr)
throws java.io.IOException
- Parameters:
topLevelDir
- an existing folder on the local filesystem. Must be readable.tailExpr
- a relative path to a file in any depth under topLevelDir.
- Throws:
java.io.IOException
- if a problem while crawling occurs.
findParentOfTail
protected java.io.File findParentOfTail(java.io.File folder)
throws java.io.IOException
- Tries to find the parent of tail in sub folders of folder parameter.
Tail is a relative path to a file in any depth of folder parameter.
It will recursively call this method trying to find the given tail's parent.
Note: THIS is being called recursively !!
- Parameters:
folder
- local folder that is used as (current) root. Sub folders wll be crawled recursively.
- Returns:
- the parent folder of the given anchor
- Throws:
java.io.IOException
- if a problem occures while crawling subfolders of *folder*
getParentOfTail
public java.io.File getParentOfTail()
- Specified by:
getParentOfTail
in interface FileTail
- Returns:
- the found (by crawling) parent of tail.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.