Changeset 11080
- Timestamp:
- 2006-01-23T13:24:35+13:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r11079 r11080 473 473 try { 474 474 File collection_image_file = new File(images_folder, file.getName()); 475 Gatherer.f_man.getQueue().copyFile(file, collection_image_file, false , null);475 Gatherer.f_man.getQueue().copyFile(file, collection_image_file, false); 476 476 477 477 // If we're using a remote Greenstone server, upload the image -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r11079 r11080 290 290 291 291 // copy the contents over 292 Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_images, new_coll_images , null);292 Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_images, new_coll_images); 293 293 } 294 294 } … … 305 305 306 306 // copy the contents over 307 Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_macros, new_coll_macros , null);307 Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_macros, new_coll_macros); 308 308 } 309 309 } … … 742 742 if (!metadata_set_file.exists()) { 743 743 try { 744 Gatherer.f_man.getQueue().copyFile(external_metadata_set_file, metadata_set_file, false , null);744 Gatherer.f_man.getQueue().copyFile(external_metadata_set_file, metadata_set_file, false); 745 745 746 746 // If we're using a remote Greenstone server, upload the metadata file -
trunk/gli/src/org/greenstone/gatherer/collection/LegacyCollectionImporter.java
r11079 r11080 53 53 try { 54 54 backup_dir.mkdirs(); 55 Gatherer.f_man.getQueue().copyFile(metadata_xml_file_file, new_metadata_xml_file_file, false , null);55 Gatherer.f_man.getQueue().copyFile(metadata_xml_file_file, new_metadata_xml_file_file, false); 56 56 if (!new_metadata_xml_file_file.exists()) { 57 57 throw new Exception(""); -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r11079 r11080 336 336 // copy the file. If anything goes wrong the copy file should throw the appropriate exception. No matter what exception is thrown (bar an IOException) we display some message, perhaps take some action, then cancel the remainder of the pending file jobs. No point in being told your out of hard drive space for each one of six thousand files eh? 337 337 try { 338 copyFile(source_file, target_file, false, progress); 338 copyFile(source_file, target_file, false); 339 progress.addValue(source_file.length()); 339 340 } 340 341 // If we can't find the source file, then the most likely reason is that the file system has changed since the last time it was mapped. Warn the user that the requested file can't be found, then force a refresh of the source folder involved. … … 583 584 * @see org.greenstone.gatherer.Gatherer 584 585 */ 585 public void copyDirectoryContents(File source, File destination , GProgressBar progress)586 public void copyDirectoryContents(File source, File destination) 586 587 throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException 587 588 { … … 597 598 File new_file = new File(destination, f_name); 598 599 if (f.isDirectory()) { 599 copyDirectoryContents(f, new_file , progress);600 copyDirectoryContents(f, new_file); 600 601 } else if (f.isFile()) { 601 copyFile(f, new_file, false , progress);602 copyFile(f, new_file, false); 602 603 } 603 604 } 604 605 } 605 } 606 606 607 607 608 /** Copy a file from the source location to the destination location. … … 610 611 * @see org.greenstone.gatherer.Gatherer 611 612 */ 612 public void copyFile(File source, File destination, boolean overwrite , GProgressBar progress)613 public void copyFile(File source, File destination, boolean overwrite) 613 614 throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException 614 615 { … … 674 675 } 675 676 } 676 if (progress != null) {677 progress.addValue(data_size);678 }679 677 } 680 678
Note:
See TracChangeset
for help on using the changeset viewer.