public class PackFile extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private 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 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 |
String |
sourcePath |
private String |
targetPath
The full path name of the target file
|
Constructor and Description |
---|
PackFile(File src,
String target,
List osList,
int override)
Constructs and initializes from a source file.
|
PackFile(File src,
String target,
List osList,
int override,
Map additionals)
Constructs and initializes from a source file.
|
Modifier and Type | Method and Description |
---|---|
Map |
getAdditionals()
Returns the additionals map.
|
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
|
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 String sourcePath
private String targetPath
private List osConstraints
private long length
private long mtime
private boolean isDirectory
private int override
private Map additionals
public int previousPackNumber
public long offsetInPreviousPack
public PackFile(File src, String target, List osList, int override) throws FileNotFoundException
src
- file which this PackFile describestarget
- the path to install the file toosList
- OS constraintsoverride
- what to do when the file already existsFileNotFoundException
- if the specified file does not exist.public PackFile(File src, String target, List osList, int override, Map additionals) throws 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 attributesFileNotFoundException
- if the specified file does not exist.public void setPreviousPackFileRef(int previousPackNumber, long offsetInPreviousPack)
public final List osConstraints()
public final long length()
public final long lastModified()
public final int override()
public final boolean isDirectory()
public final boolean isBackReference()
public final String getTargetPath()
public Map getAdditionals()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses