|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.install4j.api.FileOptions
public class FileOptions
An object that contains options for the installation of a file. Objects of this class have to be used as parameters for the installFile methods of the InstallerContext.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_MODE
The default file mode on Unix and Mac OS X. |
static int |
OVERWRITE_ALWAYS
Indicates that if the destination file exists it will be replaced in any case. |
static int |
OVERWRITE_ALWAYS_ASK
Indicates that if the destination file exists and has not been installed by a previous run of the installer the user will be asked whether to replace the file. |
static int |
OVERWRITE_ALWAYS_ASK_INCLUDING_UPDATE
Indicates that the user will be asked whether to replace the file even if it was installed by a previous run of the installer. |
static int |
OVERWRITE_IF_NEWER
Indicates that if the destination file exists it will be replaced if the source file is newer. |
static int |
OVERWRITE_IF_NEWER_OTHERWISE_ASK
Indicates that if the destination file exists it will be replaced if the source file is newer. |
static int |
OVERWRITE_NEVER
Indicates that if the destination file exists it won't be replaced in any case. |
| Constructor Summary | |
|---|---|
FileOptions()
Initializes a FileOptions instance. |
|
FileOptions(long fileTime)
Initializes a FileOptions instance. |
|
FileOptions(long fileTime,
int overwrite)
Initializes a FileOptions instance. |
|
FileOptions(long fileTime,
java.lang.String mode,
int overwrite,
boolean shared,
boolean dontUninstall)
Initializes a FileOptions instance. |
|
FileOptions(java.lang.String mode,
int overwrite,
boolean shared)
Initializes a FileOptions instance. |
|
| Method Summary | |
|---|---|
long |
getFileTime()
Returns the file time. |
java.lang.String |
getMode()
Returns the unix access mode. |
int |
getOverwrite()
Returns the overwrite mode. |
boolean |
isDontUninstall()
Returns whether the file will not be uninstalled. |
boolean |
isShared()
Returns whether the file will be installed as a shared file on Windows. |
void |
setDontUninstall(boolean dontUninstall)
Sets whether the file should not be uninstalled. |
void |
setFileTime(long fileTime)
Sets the file time. |
void |
setMode(int intMode)
Sets the unix file mode as an integer. |
void |
setMode(java.lang.String mode)
Sets the unix file mode as a String. |
void |
setOverwrite(int overwrite)
Sets the overwrite mode. |
void |
setShared(boolean shared)
Sets whether the file should be installed as shared on Windows. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OVERWRITE_NEVER
public static final int OVERWRITE_ALWAYS
public static final int OVERWRITE_IF_NEWER
public static final int OVERWRITE_IF_NEWER_OTHERWISE_ASK
public static final int OVERWRITE_ALWAYS_ASK
public static final int OVERWRITE_ALWAYS_ASK_INCLUDING_UPDATE
public static final java.lang.String DEFAULT_MODE
| Constructor Detail |
|---|
public FileOptions()
FileOptions(new Date().getTime(),
DEFAULT_MODE, OVERWRITE_ALWAYS_ASK, false, false).
public FileOptions(java.lang.String mode,
int overwrite,
boolean shared)
FileOptions(new Date().getTime(),
mode, overwrite, shared, false).
mode - the mode for the destination file (e.g. "644"). This has no effect on Windows.overwrite - one of the OVERWRITE_* constants.shared - the file will be installed as shared on Windows. This means that a reference counter will
ensure that the file won't be uninstalled if it is also used by another program. This is highly
recommended for files that will be installed in windows system directories.public FileOptions(long fileTime)
FileOptions(fileTime,
DEFAULT_MODE, OVERWRITE_ALWAYS_ASK, false, false).
fileTime - the last modified time the file will be set to.
public FileOptions(long fileTime,
int overwrite)
FileOptions(fileTime,
DEFAULT_MODE, overwrite, false, false).
fileTime - the last modified time the file will be set to.overwrite - one of the OVERWRITE_* constants.
public FileOptions(long fileTime,
java.lang.String mode,
int overwrite,
boolean shared,
boolean dontUninstall)
fileTime - the last modified time the file will be set to.mode - the mode for the destination file (e.g. "644"). This has no effect on Windows.overwrite - one of the OVERWRITE_* constants.shared - the file will be installed as shared on Windows. This means that a reference counter will
ensure that the file won't be uninstalled if it is also used by another program. This is highly
recommended for files that will be installed in windows system directories.dontUninstall - if true, the file won't be registered for uninstallation.| Method Detail |
|---|
public long getFileTime()
public void setFileTime(long fileTime)
fileTime - the new file time.public java.lang.String getMode()
public void setMode(int intMode)
intMode - the mode as an integer (e.g. 0664).public void setMode(java.lang.String mode)
mode - the mode as a String (e.g. "664").public int getOverwrite()
public void setOverwrite(int overwrite)
overwrite - one of the OVERWRITE_* constants.public boolean isShared()
public void setShared(boolean shared)
shared - true if the file should be installed as shared.public boolean isDontUninstall()
public void setDontUninstall(boolean dontUninstall)
dontUninstall - true if the file should not be uninstalled.
|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||