Class LayerEntry


  • @Deprecated
    @Immutable
    public class LayerEntry
    extends java.lang.Object
    Deprecated.
    Use FileEntry.
    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.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • 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 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:

        • 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 layer
        extractionPath - the path in the container file system corresponding to the sourceFile
        permissions - the file permissions on the container
        modificationTime - 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 use getSourceFile().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 class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object