Class CopyFileWorker

  • All Implemented Interfaces:
    java.lang.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
    • Constructor Detail

      • CopyFileWorker

        public CopyFileWorker​(java.awt.Component comp,
                              java.lang.String source,
                              java.lang.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​(java.awt.Component comp,
                              java.util.List<java.lang.String> sources,
                              java.lang.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​(java.awt.Component comp,
                              @Nonnull
                              java.util.List<java.lang.String> sources,
                              @Nonnull
                              java.lang.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 Detail

      • _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 java.lang.String toString()
        Overrides:
        toString in class Task