public final class SwordBookPath extends Object
The GNU Lesser General Public License for details.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SwordBookPath.CustomFilenameFilter
Check that the directories in the version directory really represent
versions.
|
Modifier and Type | Field and Description |
---|---|
private static String |
AUGMENT_PATH
Sword global config file's path to where mods can be found
|
private static File[] |
augmentPath
The directory URL
|
private static String |
DATA_PATH
Sword global config file's path to where mods can be found
|
private static File |
defaultDownloadDir
The directory URL
|
private static String |
DIR_SWORD_CONF
Users config directory for Sword in Unix
|
private static String |
DIR_SWORD_CONF_ALT
Users config directory for Sword in Unix
|
private static String |
DIR_SWORD_GLOBAL_CONF
Sword global config file locations
|
private static String |
DIR_SWORD_LIBRARY
Library may be a sibling of DIR_WINDOWS_DEFAULT or SWORD_HOME or CWD
|
private static String |
DIR_WINDOWS_DEFAULT
Default windows installation directory
|
private static org.slf4j.Logger |
log
The log stream
|
private static File |
overrideDownloadDir
The directory URL
|
private static String |
PREFIX_GLOBALS
File prefix for config file
|
private static String |
PROPERTY_SWORD_HOME
System property for sword home directory
|
private static String |
PROPERTY_USER_HOME
Java system property for users home directory
|
private static String |
SWORD_GLOBAL_CONF
Sword global config file
|
Modifier | Constructor and Description |
---|---|
private |
SwordBookPath()
Some basic name initialization
|
Modifier and Type | Method and Description |
---|---|
static File[] |
getAugmentPath()
Retrieve the additional locations that Sword may hold Books.
|
static String[] |
getBookList(File bookDir)
Get a list of books in a given location.
|
private static File |
getDefaultDownloadPath() |
private static File[] |
getDefaultPaths()
Search all of the "standard" Sword locations for Books.
|
static File |
getDownloadDir() |
static File |
getSwordDownloadDir()
Get the download directory, which is either the one that the user chose
or that JSword picked for the user.
|
static File[] |
getSwordPath()
Obtain a prioritized path of Book locations.
|
private static boolean |
migrate(File oldPath,
File newPath) |
private static void |
migrateBookDir() |
private static void |
migrateBookDir(File oldPath,
File newPath) |
private static void |
readSwordConf(List<File> bookDirs,
File swordConfDir) |
private static void |
readSwordConf(List<File> bookDirs,
String swordConfDir) |
static void |
setAugmentPath(File[] theNewDirs)
Establish additional locations that Sword may hold books.
|
static void |
setDownloadDir(File dlDir) |
private static void |
testDefaultPath(List<File> bookDirs,
File path)
Check to see if the given directory is a Sword mods.d directory and then
add it to the list if it is.
|
private static void |
testDefaultPath(List<File> bookDirs,
String path)
Check to see if the given directory is a Sword mods.d directory and then
add it to the list if it is.
|
private static final String DIR_WINDOWS_DEFAULT
private static final String DIR_SWORD_LIBRARY
private static final String DIR_SWORD_CONF
private static final String DIR_SWORD_CONF_ALT
private static final String SWORD_GLOBAL_CONF
private static final String DIR_SWORD_GLOBAL_CONF
private static final String DATA_PATH
private static final String AUGMENT_PATH
private static final String PROPERTY_SWORD_HOME
private static final String PROPERTY_USER_HOME
private static final String PREFIX_GLOBALS
private static File[] augmentPath
private static File defaultDownloadDir
private static File overrideDownloadDir
private static final org.slf4j.Logger log
public static void setAugmentPath(File[] theNewDirs) throws BookException
theNewDirs
- The new Sword directoriesBookException
public static File[] getAugmentPath()
public static File[] getSwordPath()
public static String[] getBookList(File bookDir)
bookDir
- the directory in which to lookprivate static File[] getDefaultPaths()
private static void testDefaultPath(List<File> bookDirs, File path)
bookDirs
- The list to add good pathspath
- the path to checkprivate static void testDefaultPath(List<File> bookDirs, String path)
bookDirs
- The list to add good pathspath
- the path to checkprivate static File getDefaultDownloadPath()
private static void migrateBookDir()
public static File getSwordDownloadDir()
public static File getDownloadDir()
public static void setDownloadDir(File dlDir)
dlDir
- The download directory that the user specifies.