Ignore:
Timestamp:
2006-01-23T13:24:35+13:00 (18 years ago)
Author:
mdewsnip
Message:

Removed the "progress" parameter from copyFile, as part of the FileQueue rewrite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r11079 r11080  
    336336                    // 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?
    337337                    try {
    338                     copyFile(source_file, target_file, false, progress);
     338                    copyFile(source_file, target_file, false);
     339                    progress.addValue(source_file.length());
    339340                    }
    340341                    // 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.
     
    583584     * @see org.greenstone.gatherer.Gatherer
    584585     */
    585     public void copyDirectoryContents(File source, File destination, GProgressBar progress)
     586    public void copyDirectoryContents(File source, File destination)
    586587    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException
    587588    {
     
    597598        File new_file = new File(destination, f_name);
    598599        if (f.isDirectory()) {
    599         copyDirectoryContents(f, new_file, progress);
     600        copyDirectoryContents(f, new_file);
    600601        } else if (f.isFile()) {
    601         copyFile(f, new_file, false, progress);
     602        copyFile(f, new_file, false);
    602603        }
    603604    }
    604    
    605     }
     605    }
     606
    606607   
    607608    /** Copy a file from the source location to the destination location.
     
    610611     * @see org.greenstone.gatherer.Gatherer
    611612     */
    612     public void copyFile(File source, File destination, boolean overwrite, GProgressBar progress)
     613    public void copyFile(File source, File destination, boolean overwrite)
    613614    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException
    614615    {
     
    674675        }
    675676        }
    676         if (progress != null) {
    677         progress.addValue(data_size);
    678         }
    679677    }
    680678
Note: See TracChangeset for help on using the changeset viewer.