Class SalmonFileCommander

java.lang.Object
com.mku.utils.FileCommander
com.mku.salmon.utils.SalmonFileCommander

public class SalmonFileCommander extends FileCommander
Facade class for file operations.
  • Constructor Details

    • SalmonFileCommander

      public SalmonFileCommander(int importBufferSize, int exportBufferSize, int threads)
      Instantiate a new file commander object.
      Parameters:
      importBufferSize - The buffer size to use for importing files.
      exportBufferSize - The buffer size to use for exporting files.
      threads - The threads to use for import and export
  • Method Details

    • importFiles

      public SalmonFile[] importFiles(IRealFile[] filesToImport, IVirtualFile importDir, boolean deleteSource, boolean integrity, Consumer<FileCommander.RealFileTaskProgress> onProgressChanged, Function<IRealFile,String> autoRename, BiConsumer<IRealFile,Exception> onFailed) throws Exception
      Description copied from class: FileCommander
      Import files to the drive.
      Overrides:
      importFiles in class FileCommander
      Parameters:
      filesToImport - The files to import.
      importDir - The target directory.
      deleteSource - True if you want to delete the source files when import complete.
      integrity - True to apply integrity to imported files.
      onProgressChanged - Observer to notify when progress changes.
      autoRename - Function to rename file if another file with the same filename exists
      onFailed - Observer to notify when a file fails importing
      Returns:
      The imported files if completes successfully.
      Throws:
      Exception - Thrown if error occurs during import