com.izforge.izpack.panels.path
Class PathInputBase

java.lang.Object
  extended by com.izforge.izpack.panels.path.PathInputBase

public class PathInputBase
extends Object

Link common functionality for PathInputPanels here. Help to keep features and bug fixes in sync between console and GUI installations for PathInputPanel (Ex. TargetPanel).

Author:
Miles Tjandrawidjaja

Field Summary
static String SHOWCREATEDIRECTORYMESSAGE
          ShowCreateDirectoryMessage configuration option
If 'ShowCreateDirectoryMessage' configuration option set 'false' then don't show then don't show "directory will be created" dialog
static String SHOWEXISTINGDIRECTORYWARNING
          ShowExistingDirectoryWarning configuration option
If 'ShowExistingDirectoryWarning' configuration option set 'false' then don't show "The directory already exists! Are you sure you want to install here and possibly overwrite existing files?" warning dialog
 
Constructor Summary
PathInputBase()
           
 
Method Summary
static boolean isWritable(File path)
          Verify that the given path to a file or directory is writable.
static boolean isWritable(String path)
          Verify that the given path to a file or directory is writable.
static String normalizePath(String path)
          Normalize a path.
static void setInstallData(InstallData installData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOWCREATEDIRECTORYMESSAGE

public static final String SHOWCREATEDIRECTORYMESSAGE
ShowCreateDirectoryMessage configuration option
If 'ShowCreateDirectoryMessage' configuration option set 'false' then don't show then don't show "directory will be created" dialog

See Also:
Constant Field Values

SHOWEXISTINGDIRECTORYWARNING

public static final String SHOWEXISTINGDIRECTORYWARNING
ShowExistingDirectoryWarning configuration option
If 'ShowExistingDirectoryWarning' configuration option set 'false' then don't show "The directory already exists! Are you sure you want to install here and possibly overwrite existing files?" warning dialog

See Also:
Constant Field Values
Constructor Detail

PathInputBase

public PathInputBase()
Method Detail

setInstallData

public static void setInstallData(InstallData installData)

isWritable

public static boolean isWritable(String path)
Verify that the given path to a file or directory is writable. Ex. /home/user/example/test //Check to see if we can write "test" into /home/user/example/

Parameters:
path - path to file or directory to be written
Returns:
true if location is writable else false

isWritable

public static boolean isWritable(File path)
Verify that the given path to a file or directory is writable. Ex. /home/user/example/test //Check to see if we can write "test" into /home/user/example/

Parameters:
path - path to file or directory to be written
Returns:
true if location is writable else false

normalizePath

public static String normalizePath(String path)
Normalize a path. Compresses consecutive file separators and replace the "~" with the users home directory if installation is being run on a UNIX platform.

Parameters:
path - path to normalize
Returns:
normalized path


Copyright © 2018. All rights reserved.