public class LayerEntry extends Object
Note that:
LayerEntry.
| Modifier and Type | Field and Description |
|---|---|
static BiFunction<Path,AbsoluteUnixPath,FilePermissions> |
DEFAULT_FILE_PERMISSIONS_PROVIDER
Provider that returns default file permissions (644 for files, 755 for directories).
|
static Instant |
DEFAULT_MODIFIED_TIME |
static BiFunction<Path,AbsoluteUnixPath,Instant> |
DEFAULT_MODIFIED_TIME_PROVIDER
Provider that returns default file modification time (EPOCH + 1 second).
|
| Constructor and Description |
|---|
LayerEntry(Path sourceFile,
AbsoluteUnixPath extractionPath)
Instantiates with a source file and the path to place the source file in the container file
system.
|
LayerEntry(Path sourceFile,
AbsoluteUnixPath extractionPath,
FilePermissions permissions)
Instantiates with a source file and the path to place the source file in the container file
system.
|
LayerEntry(Path sourceFile,
AbsoluteUnixPath extractionPath,
FilePermissions permissions,
Instant lastModifiedTime)
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(Object other) |
AbsoluteUnixPath |
getExtractionPath()
Gets the extraction path.
|
Instant |
getLastModifiedTime()
Returns the modification time of the file in the entry.
|
FilePermissions |
getPermissions()
Gets the file permissions on the container.
|
Path |
getSourceFile()
Gets the source file.
|
int |
hashCode() |
public static final BiFunction<Path,AbsoluteUnixPath,FilePermissions> DEFAULT_FILE_PERMISSIONS_PROVIDER
public static final Instant DEFAULT_MODIFIED_TIME
public static final BiFunction<Path,AbsoluteUnixPath,Instant> DEFAULT_MODIFIED_TIME_PROVIDER
public LayerEntry(Path sourceFile, AbsoluteUnixPath extractionPath)
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/.
sourceFile - the source file to add to the layerextractionPath - the path in the container file system corresponding to the sourceFilepublic LayerEntry(Path sourceFile, AbsoluteUnixPath extractionPath, FilePermissions permissions)
sourceFile - the source file to add to the layerextractionPath - the path in the container file system corresponding to the sourceFilepermissions - the file permissions on the container. Use null to use defaults (644
for files, 755 for directories)public LayerEntry(Path sourceFile, AbsoluteUnixPath extractionPath, FilePermissions permissions, Instant lastModifiedTime)
sourceFile - the source file to add to the layerextractionPath - the path in the container file system corresponding to the sourceFilepermissions - the file permissions on the containerlastModifiedTime - the file modification time, default to 1 second since the epoch
(https://github.com/GoogleContainerTools/jib/issues/1079)public Instant getLastModifiedTime()
public 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()
Copyright © 2019. All rights reserved.