|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.sword.SwordBookPath
public final class SwordBookPath
This represents all of the Sword Books (aka modules).
The GNU Lesser General Public License for details.
Nested Class Summary | |
---|---|
(package private) static class |
SwordBookPath.CustomFilenameFilter
Check that the directories in the version directory really represent versions. |
Field Summary | |
---|---|
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 |
Constructor Summary | |
---|---|
private |
SwordBookPath()
Some basic name initialization |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
private SwordBookPath()
Method Detail |
---|
public static void setAugmentPath(File[] theNewDirs) throws BookException
theNewDirs
- The new Sword directories
BookException
public static File[] getAugmentPath()
public static File[] getSwordPath()
public static String[] getBookList(File bookDir)
bookDir
- the directory in which to look
private static File[] getDefaultPaths()
private static void readSwordConf(List<File> bookDirs, File swordConfDir)
private static void readSwordConf(List<File> bookDirs, String swordConfDir)
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()
private static void migrateBookDir(File oldPath, File newPath)
private static boolean migrate(File oldPath, File newPath)
public static File getSwordDownloadDir()
public static File getDownloadDir()
public static void setDownloadDir(File dlDir)
dlDir
- The download directory that the user specifies.
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |