Module jEdit

Class CopyFileWorker

java.lang.Object
org.gjt.sp.util.Task
org.gjt.sp.jedit.io.CopyFileWorker
All Implemented Interfaces:
Runnable, ProgressObserver

public class CopyFileWorker extends Task
This worker will copy a file. Be careful it override files if the target already exists
Since:
jEdit 4.3pre13
Author:
Matthieu Casanova
  • Constructor Details

    • CopyFileWorker

      public CopyFileWorker(Component comp, String source, String target)
      Copy a file. Careful, it will overwrite the target.
      Parameters:
      comp - the component that will be used as parent in case of error
      source - the source path
      target - the target path (it is the file path, not a parent directory)
    • CopyFileWorker

      public CopyFileWorker(Component comp, List<String> sources, String target)
      Copy all files from the list to the target directory. If some files already exist in the target directory the files will be skipped.
      Parameters:
      comp - the component that will be used as parent in case of error
      sources - the sources path to copy
      target - the target path (it must be a directory otherwise nothing will be copied)
      Since:
      jEdit 5.0
    • CopyFileWorker

      public CopyFileWorker(Component comp, @Nonnull List<String> sources, @Nonnull String target, CopyFileWorker.Behavior behavior)
      Copy all files from the list to the target directory. If some files already exist in the target directory the Behavior will decide what to do.
      Parameters:
      comp - the component that will be used as parent in case of error
      sources - the sources path to copy
      target - the target path (it must be a directory otherwise nothing will be copied)
      behavior - the behavior if the target file already exists
      Since:
      jEdit 5.0
  • Method Details

    • _run

      public void _run()
      Description copied from class: Task
      This is the method you have to implement and that will be executed in the thread.
      Specified by:
      _run in class Task
    • toString

      public String toString()
      Overrides:
      toString in class Task