public class MountableFile extends java.lang.Object implements Transferable
DEFAULT_DIR_MODE, DEFAULT_FILE_MODE
Modifier and Type | Method and Description |
---|---|
static MountableFile |
forClasspathResource(@NotNull java.lang.String resourceName)
Obtains a
MountableFile corresponding to a resource on the classpath (including resources in JAR files) |
static MountableFile |
forClasspathResource(@NotNull java.lang.String resourceName,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a resource on the classpath (including resources in JAR files) |
static MountableFile |
forHostPath(java.nio.file.Path path)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(java.nio.file.Path path,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(@NotNull java.lang.String path)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
static MountableFile |
forHostPath(@NotNull java.lang.String path,
java.lang.Integer mode)
Obtains a
MountableFile corresponding to a file on the docker host filesystem. |
java.lang.String |
getDescription() |
int |
getFileMode()
Get file mode.
|
java.lang.String |
getFilesystemPath() |
java.lang.String |
getResolvedPath() |
long |
getSize()
Size of an object.
|
static int |
getUnixFileMode(java.nio.file.Path path) |
void |
transferTo(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream outputStream,
java.lang.String destinationPathInTar)
transfer content of this Transferable to the output stream.
|
void |
updateChecksum(java.util.zip.Checksum checksum) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBytes, of, of, of
public static MountableFile forClasspathResource(@NotNull @NotNull java.lang.String resourceName)
MountableFile
corresponding to a resource on the classpath (including resources in JAR files)resourceName
- the classpath path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(@NotNull @NotNull java.lang.String path)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(java.nio.file.Path path)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourceMountableFile
that may be used to obtain a mountable pathpublic static MountableFile forClasspathResource(@NotNull @NotNull java.lang.String resourceName, java.lang.Integer mode)
MountableFile
corresponding to a resource on the classpath (including resources in JAR files)resourceName
- the classpath path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(@NotNull @NotNull java.lang.String path, java.lang.Integer mode)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic static MountableFile forHostPath(java.nio.file.Path path, java.lang.Integer mode)
MountableFile
corresponding to a file on the docker host filesystem.path
- the path to the resourcemode
- octal value of posix file mode (000..777)MountableFile
that may be used to obtain a mountable pathpublic void transferTo(org.apache.commons.compress.archivers.tar.TarArchiveOutputStream outputStream, java.lang.String destinationPathInTar)
transferTo
in interface Transferable
outputStream
- stream to outputpublic long getSize()
Transferable
getSize
in interface Transferable
public java.lang.String getDescription()
getDescription
in interface Transferable
public void updateChecksum(java.util.zip.Checksum checksum)
updateChecksum
in interface Transferable
public int getFileMode()
Transferable
getFileMode
in interface Transferable
Transferable.DEFAULT_FILE_MODE
@UnstableAPI public static int getUnixFileMode(java.nio.file.Path path)
public java.lang.String getResolvedPath()
public java.lang.String getFilesystemPath()