Package com.google.cloud.tools.jib.api
Class LayerEntry
- java.lang.Object
-
- com.google.cloud.tools.jib.api.LayerEntry
-
@Deprecated @Immutable public class LayerEntry extends java.lang.Object
Deprecated.UseFileEntry
.Represents an entry in the layer. A layer consists of many entries that can be converted into tar archive entries.This class is immutable and thread-safe.
-
-
Constructor Summary
Constructors Constructor Description LayerEntry(java.nio.file.Path sourceFile, com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath extractionPath, com.google.cloud.tools.jib.api.buildplan.FilePermissions permissions, java.time.Instant modificationTime)
Deprecated.Instantiates with a source file and the path to place the source file in the container file system.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Deprecated.com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath
getExtractionPath()
Deprecated.Gets the extraction path.java.time.Instant
getModificationTime()
Deprecated.Returns the modification time of the file in the entry.com.google.cloud.tools.jib.api.buildplan.FilePermissions
getPermissions()
Deprecated.Gets the file permissions on the container.java.nio.file.Path
getSourceFile()
Deprecated.Gets the source file.int
hashCode()
Deprecated.
-
-
-
Constructor Detail
-
LayerEntry
public LayerEntry(java.nio.file.Path sourceFile, com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath extractionPath, com.google.cloud.tools.jib.api.buildplan.FilePermissions permissions, java.time.Instant modificationTime)
Deprecated.Instantiates with a source file and the path to place the source file in the container file system.For example,
new LayerEntry(Paths.get("HelloWorld.class"), AbsoluteUnixPath.get("/app/classes/HelloWorld.class"))
adds a fileHelloWorld.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 ofcom/
.Note that:
- Entry source files can be either files or directories.
- Adding a directory does not include the contents of the directory. Each file under a
directory must be added as a separate
LayerEntry
.
- Parameters:
sourceFile
- the source file to add to the layerextractionPath
- the path in the container file system corresponding to thesourceFile
permissions
- the file permissions on the containermodificationTime
- the file modification time
-
-
Method Detail
-
getModificationTime
public java.time.Instant getModificationTime()
Deprecated.Returns the modification time of the file in the entry.- Returns:
- the modification time
-
getSourceFile
public java.nio.file.Path getSourceFile()
Deprecated.Gets the source file. The source file may be relative or absolute, so the caller should usegetSourceFile().toAbsolutePath().toString()
for the serialized form since the serialization could change independently of the path representation.- Returns:
- the source file
-
getExtractionPath
public com.google.cloud.tools.jib.api.buildplan.AbsoluteUnixPath getExtractionPath()
Deprecated.Gets the extraction path.- Returns:
- the extraction path
-
getPermissions
public com.google.cloud.tools.jib.api.buildplan.FilePermissions getPermissions()
Deprecated.Gets the file permissions on the container.- Returns:
- the file permissions on the container
-
equals
public boolean equals(java.lang.Object other)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
-