Package org.eclipse.jetty.start
Class PathFinder
- java.lang.Object
-
- java.nio.file.SimpleFileVisitor<java.nio.file.Path>
-
- org.eclipse.jetty.start.PathFinder
-
- All Implemented Interfaces:
java.nio.file.FileVisitor<java.nio.file.Path>
public class PathFinder extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
-
-
Constructor Summary
Constructors Constructor Description PathFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathMatchergetDirMatcher()java.nio.file.PathMatchergetFileMatcher()java.util.List<java.io.File>getHitList()java.util.Collection<java.nio.file.Path>getHits()booleanisIncludeDirsInResults()java.nio.file.FileVisitResultpreVisitDirectory(java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attrs)voidsetBase(java.nio.file.Path basePath)Set the active basePath, used for resolving relative paths.voidsetDirMatcher(java.nio.file.PathMatcher dirMatcher)voidsetFileMatcher(java.lang.String pattern)voidsetFileMatcher(java.nio.file.PathMatcher fileMatcher)voidsetIncludeDirsInResults(boolean includeDirsInResults)java.nio.file.FileVisitResultvisitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs)java.nio.file.FileVisitResultvisitFileFailed(java.nio.file.Path file, java.io.IOException exc)
-
-
-
Method Detail
-
getDirMatcher
public java.nio.file.PathMatcher getDirMatcher()
-
getFileMatcher
public java.nio.file.PathMatcher getFileMatcher()
-
getHitList
public java.util.List<java.io.File> getHitList()
-
getHits
public java.util.Collection<java.nio.file.Path> getHits()
-
isIncludeDirsInResults
public boolean isIncludeDirsInResults()
-
preVisitDirectory
public java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException- Specified by:
preVisitDirectoryin interfacejava.nio.file.FileVisitor<java.nio.file.Path>- Overrides:
preVisitDirectoryin classjava.nio.file.SimpleFileVisitor<java.nio.file.Path>- Throws:
java.io.IOException
-
setBase
public void setBase(java.nio.file.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(java.nio.file.PathMatcher dirMatcher)
-
setFileMatcher
public void setFileMatcher(java.nio.file.PathMatcher fileMatcher)
-
setFileMatcher
public void setFileMatcher(java.lang.String pattern)
-
setIncludeDirsInResults
public void setIncludeDirsInResults(boolean includeDirsInResults)
-
visitFile
public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException- Specified by:
visitFilein interfacejava.nio.file.FileVisitor<java.nio.file.Path>- Overrides:
visitFilein classjava.nio.file.SimpleFileVisitor<java.nio.file.Path>- Throws:
java.io.IOException
-
visitFileFailed
public java.nio.file.FileVisitResult visitFileFailed(java.nio.file.Path file, java.io.IOException exc) throws java.io.IOException- Specified by:
visitFileFailedin interfacejava.nio.file.FileVisitor<java.nio.file.Path>- Overrides:
visitFileFailedin classjava.nio.file.SimpleFileVisitor<java.nio.file.Path>- Throws:
java.io.IOException
-
-