Interface PathRoot
- All Known Subinterfaces:
ManagedDirectory
public interface PathRoot
A path-like object that can provide a
Java NIO Path.
This enables wrapping various implementations and providers of Path objects
in a translucent façade that enables representing paths in a hierarchical format.
- Since:
- 0.0.1
- Author:
- Ashley Scopes
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]asJar()Convert the given path root into a JAR and return the byte contents of the JAR.booleanDetermine if two path roots are equivalent.Get the parent path root, if there is one.getPath()Get theJava NIO Pathfor this path-like object.getUri()Get a URI representation of this path-like object.getUrl()Get a URL representation of this path-like object.inthashCode()Determine the hash-code for the object.
-
Method Details
-
asJar
byte[] asJar()Convert the given path root into a JAR and return the byte contents of the JAR.You can use this to create JAR files from existing path roots, if you want to package some compiled outputs into a JAR to use them as inputs to another build.
- Returns:
- the byte contents of the JAR.
- Throws:
UncheckedIOException- if the JAR cannot be created.UnsupportedOperationException- if the operation is not supported.- Since:
- 0.4.0
-
equals
Determine if two path roots are equivalent. If the provided object isnullor not an instance of aPathRoot, then this will returnfalseunless otherwise specified. -
hashCode
-
getPath
-
getUri
-
getUrl
-
getParent
-