Package org.eclipse.jetty.start
Class PathFinder
- java.lang.Object
-
- java.nio.file.SimpleFileVisitor<Path>
-
- org.eclipse.jetty.start.PathFinder
-
- All Implemented Interfaces:
FileVisitor<Path>
public class PathFinder extends SimpleFileVisitor<Path>
-
-
Constructor Summary
Constructors Constructor Description PathFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathMatchergetDirMatcher()PathMatchergetFileMatcher()List<File>getHitList()Collection<Path>getHits()booleanisIncludeDirsInResults()FileVisitResultpreVisitDirectory(Path dir, BasicFileAttributes attrs)voidsetBase(Path basePath)Set the active basePath, used for resolving relative paths.voidsetDirMatcher(PathMatcher dirMatcher)voidsetFileMatcher(String pattern)voidsetFileMatcher(PathMatcher fileMatcher)voidsetIncludeDirsInResults(boolean includeDirsInResults)FileVisitResultvisitFile(Path file, BasicFileAttributes attrs)FileVisitResultvisitFileFailed(Path file, IOException exc)-
Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory
-
-
-
-
Method Detail
-
getDirMatcher
public PathMatcher getDirMatcher()
-
getFileMatcher
public PathMatcher getFileMatcher()
-
getHits
public Collection<Path> getHits()
-
isIncludeDirsInResults
public boolean isIncludeDirsInResults()
-
preVisitDirectory
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException
- Specified by:
preVisitDirectoryin interfaceFileVisitor<Path>- Overrides:
preVisitDirectoryin classSimpleFileVisitor<Path>- Throws:
IOException
-
setBase
public void setBase(Path basePath)
Set the active basePath, used for resolving relative paths.When a hit arrives for a subsequent find that has the same relative path as a prior hit, the new hit overrides the prior path as the active hit.
- Parameters:
basePath- the basePath to tag all hits with
-
setDirMatcher
public void setDirMatcher(PathMatcher dirMatcher)
-
setFileMatcher
public void setFileMatcher(PathMatcher fileMatcher)
-
setFileMatcher
public void setFileMatcher(String pattern)
-
setIncludeDirsInResults
public void setIncludeDirsInResults(boolean includeDirsInResults)
-
visitFile
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException
- Specified by:
visitFilein interfaceFileVisitor<Path>- Overrides:
visitFilein classSimpleFileVisitor<Path>- Throws:
IOException
-
visitFileFailed
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException
- Specified by:
visitFileFailedin interfaceFileVisitor<Path>- Overrides:
visitFileFailedin classSimpleFileVisitor<Path>- Throws:
IOException
-
-