public class PackFile
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.util.Map |
additionals
Additional attributes or any else for customisation
|
private boolean |
isDirectory
True if file is a directory (length should be 0 or ignored)
|
private long |
length
The length of the file in bytes
|
private long |
mtime
The last-modification time of the file.
|
long |
offsetInPreviousPack |
private java.util.List |
osConstraints
The target operating system constraints of this file
|
private int |
override
Whether or not this file is going to override any existing ones
|
static int |
OVERRIDE_ASK_FALSE |
static int |
OVERRIDE_ASK_TRUE |
static int |
OVERRIDE_FALSE |
static int |
OVERRIDE_TRUE |
static int |
OVERRIDE_UPDATE |
int |
previousPackNumber |
(package private) static long |
serialVersionUID |
java.lang.String |
sourcePath |
private java.lang.String |
targetPath
The full path name of the target file
|
Constructor and Description |
---|
PackFile(java.io.File src,
java.lang.String target,
java.util.List osList,
int override)
Constructs and initializes from a source file.
|
PackFile(java.io.File src,
java.lang.String target,
java.util.List osList,
int override,
java.util.Map additionals)
Constructs and initializes from a source file.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map |
getAdditionals()
Returns the additionals map.
|
java.lang.String |
getTargetPath()
The full path name of the target file, using '/' as fileseparator.
|
boolean |
isBackReference() |
boolean |
isDirectory() |
long |
lastModified()
The last-modification time of the file.
|
long |
length()
The length of the file in bytes
|
java.util.List |
osConstraints()
The target operating system constraints of this file
|
int |
override()
Whether or not this file is going to override any existing ones
|
void |
setPreviousPackFileRef(int previousPackNumber,
long offsetInPreviousPack) |
static final long serialVersionUID
public static final int OVERRIDE_FALSE
public static final int OVERRIDE_TRUE
public static final int OVERRIDE_ASK_FALSE
public static final int OVERRIDE_ASK_TRUE
public static final int OVERRIDE_UPDATE
public java.lang.String sourcePath
private java.lang.String targetPath
private java.util.List osConstraints
private long length
private long mtime
private boolean isDirectory
private int override
private java.util.Map additionals
public int previousPackNumber
public long offsetInPreviousPack
public PackFile(java.io.File src, java.lang.String target, java.util.List osList, int override) throws java.io.FileNotFoundException
src
- file which this PackFile describestarget
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already existsjava.io.FileNotFoundException
- if the specified file does not exist.public PackFile(java.io.File src, java.lang.String target, java.util.List osList, int override, java.util.Map additionals) throws java.io.FileNotFoundException
src
- file which this PackFile describestarget
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already existsadditionals
- additional attributesjava.io.FileNotFoundException
- if the specified file does not exist.public void setPreviousPackFileRef(int previousPackNumber, long offsetInPreviousPack)
public final java.util.List osConstraints()
public final long length()
public final long lastModified()
public final int override()
public final boolean isDirectory()
public final boolean isBackReference()
public final java.lang.String getTargetPath()
public java.util.Map getAdditionals()