public class LayerEntry
extends java.lang.Object
Constructor and Description |
---|
LayerEntry(java.nio.file.Path sourceFile,
AbsoluteUnixPath extractionPath,
FilePermissions permissions,
java.time.Instant modificationTime)
Instantiates with a source file and the path to place the source file in the container file
system.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
AbsoluteUnixPath |
getExtractionPath()
Gets the extraction path.
|
java.time.Instant |
getModificationTime()
Returns the modification time of the file in the entry.
|
FilePermissions |
getPermissions()
Gets the file permissions on the container.
|
java.nio.file.Path |
getSourceFile()
Gets the source file.
|
int |
hashCode() |
public LayerEntry(java.nio.file.Path sourceFile, AbsoluteUnixPath extractionPath, FilePermissions permissions, java.time.Instant modificationTime)
For example, new LayerEntry(Paths.get("HelloWorld.class"),
AbsoluteUnixPath.get("/app/classes/HelloWorld.class"))
adds a file HelloWorld.class
to
the container file system at /app/classes/HelloWorld.class
.
For example, new LayerEntry(Paths.get("com"),
AbsoluteUnixPath.get("/app/classes/com"))
adds a directory to the container file system at
/app/classes/com
. This does not add the contents of com/
.
Note that:
LayerEntry
.
sourceFile
- the source file to add to the layerextractionPath
- the path in the container file system corresponding to the sourceFile
permissions
- the file permissions on the containermodificationTime
- the file modification timepublic java.time.Instant getModificationTime()
public java.nio.file.Path getSourceFile()
getSourceFile().toAbsolutePath().toString()
for the serialized form since the
serialization could change independently of the path representation.public AbsoluteUnixPath getExtractionPath()
public FilePermissions getPermissions()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object