Changeset 9045 for trunk/gli/src/org/greenstone/gatherer/util
- Timestamp:
- 2005-02-15T15:39:48+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r9036 r9045 345 345 return new File(getGLIUserFolder(), StaticStrings.CACHE_FOLDER); 346 346 } 347 /** Method which constructs the collect directory for Greenstone.348 * @param gsdl_path The location of the gsdl installation directory as a <strong>String</strong>.349 * @return The location of the collection directory, also as a <strong>String</strong>.350 */351 public static String getCollectDir(String gsdl_path) {352 return gsdl_path + COL_DIR;353 }354 static public String getCollectDir(String gsdl3_path, String site_name) {355 return getSitesDir(gsdl3_path) + site_name + File.separator + COL_DIR;356 }357 358 359 /** Method which constructs a collection's top level directory360 * @@param gsdl_path The location of the gsdl installation directory as a <strong>String</strong>.361 * @param The name of the collection as a <strong>String</strong>.362 * @return The location of the collection's base directory363 */364 public static String getCollectionDir(String gsdl_path, String coll_name) {365 return getCollectDir(gsdl_path) + coll_name + File.separator;366 }367 public static String getCollectionDir(String gsdl3_path, String site_name, String coll_name) {368 return getCollectDir(gsdl3_path, site_name) + coll_name + File.separator;369 }370 347 371 348 … … 485 462 } 486 463 487 /** Method which constructs the images directory given a certain collection. 488 * @param col_dir The location of the collection directory as a <strong>String</strong>. 489 * @return The location of the given collections images directory, also as a <strong>String</strong>. 490 */ 491 public static String getImagesDir(String col_dir) { 492 return col_dir + IMAGES_DIR; 493 } 464 494 465 /** Method which constructs the import directory given a certain collection. 495 466 * @param col_dir The location of the collection directory as a <strong>String</strong>. … … 709 680 710 681 711 static public void zipup(String col_name, String dir_or_file) 712 { 713 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 682 static public void zipup(String col_dir, String col_name, String dir_or_file) 683 { 714 684 int prefix_strip = col_dir.length(); 715 685 … … 762 732 763 733 764 static public void unzip(String col_name) 765 { 766 String col_dir = Utility.getCollectDir(Configuration.gsdl_path); 734 static public void unzip(String col_dir, String col_name) 735 { 767 736 String zip_fname = col_dir + col_name + ".zip"; 768 737 int zip_mode = ZipFile.OPEN_READ | ZipFile.OPEN_DELETE;
Note:
See TracChangeset
for help on using the changeset viewer.