Package io.quarkus.paths
Interface PathVisit
-
public interface PathVisit
Provides context for a given path visit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Path
getPath()
The path being visited.String
getRelativePath(String separator)
Path relative to the root of the tree as a string with a provided path element separator.Path
getRoot()
The root of the path tree the current path belongs to.default URL
getUrl()
URL
that can be used to read the content of the path.void
stopWalking()
Terminates walking over aPathTree
after this visit.
-
-
-
Method Detail
-
getRoot
Path getRoot()
The root of the path tree the current path belongs to. For aPathTree
created for an archive, this will be the path to the archive file. For aPathTree
created for a directory, this will be the path to the directory.- Returns:
- root of the path tree the current path belongs to
-
getPath
Path getPath()
The path being visited. TheFileSystem
the path belongs to will depend on the implementation of thePathTree
being visited. For example, for an archive it will be a ZIPFileSystem
implementation. The returned path is granted to exist in the underlying file system (unless it was deleted by a parallel process or thread) and therefore it can be used for I/O operations straight away without further resolving, e.g. againstgetRoot()
- Returns:
- path being visited
-
getUrl
default URL getUrl()
URL
that can be used to read the content of the path.- Returns:
- URL that can be used to read the content of the path
-
getRelativePath
String getRelativePath(String separator)
Path relative to the root of the tree as a string with a provided path element separator. For aPathTree
created for an archive, the returned path will be relative to the root of the correspondingFileSystem
implementation. For aPathTree
created for a directory, the returned path will be relative to the directory used as the root of the path tree.- Parameters:
separator
- path element separator- Returns:
- path relative to the root of the tree as a string with a provided path element separator
-
stopWalking
void stopWalking()
Terminates walking over aPathTree
after this visit.
-
-