Changeset 6581
- Timestamp:
- 2004-01-22T13:52:25+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r6565 r6581 480 480 return col_dir + BUILD_DIR; 481 481 } 482 /** Builds the private cache dir by appending col_dir and 'cache'. 483 * @param col_dir A String representing the directory path of the current collection. 484 * @return A String representing the path to the private file cache within the current collection. 485 */ 486 public static String getCacheDir(String col_dir) { 487 return col_dir + GCACHE_DIR; 482 /** Builds the cache dir by appending the user path and 'cache'. 483 * @return a File representing the path to the private file cache within the current collection. 484 */ 485 public static File getCacheDir() { 486 return new File(getGLIUserFolder(), StaticStrings.CACHE_FOLDER); 488 487 } 489 488 /** Method which constructs the collection directory for Greenstone. … … 555 554 } 556 555 556 static public File getGLIUserFolder() { 557 File gli_user_folder = new File(System.getProperty("user.home") + File.separator + ".gli" + File.separator); 558 return gli_user_folder; 559 } 560 557 561 /** Retrieve the full file path to the help index xml file. 558 562 * @return the full path as a String 559 563 */ 560 static public String getHelp Index() {561 String help_ index = HELP_DIR + Gatherer.config.getLanguage() + File.separator + StaticStrings.HELP_INDEX_FILENAME;562 File help_ index_file = new File(help_index);564 static public String getHelpFolder() { 565 String help_folder = HELP_DIR + Gatherer.config.getLanguage() + File.separator; 566 File help_folder_file = new File(help_folder); 563 567 // If that file can't be found, default to english 564 if(!help_ index_file.exists()) {565 help_ index = HELP_DIR + StaticStrings.ENGLISH_LANGUAGE_STR + File.separator + StaticStrings.HELP_INDEX_FILENAME;566 } 567 return help_ index;568 if(!help_folder_file.exists()) { 569 help_folder = HELP_DIR + StaticStrings.ENGLISH_LANGUAGE_STR + File.separator; 570 } 571 return help_folder; 568 572 } 569 573
Note:
See TracChangeset
for help on using the changeset viewer.