java.lang.Object
org.gjt.sp.util.Task
org.gjt.sp.jedit.io.CopyFileWorker
- All Implemented Interfaces:
Runnable
,ProgressObserver
This worker will copy a file. Be careful it override files if the target
already exists
- Since:
- jEdit 4.3pre13
- Author:
- Matthieu Casanova
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The behavior if the target already exists -
Constructor Summary
ConstructorDescriptionCopyFileWorker
(Component comp, String source, String target) Copy a file.CopyFileWorker
(Component comp, List<String> sources, String target) Copy all files from the list to the target directory.CopyFileWorker
(Component comp, List<String> sources, String target, CopyFileWorker.Behavior behavior) Copy all files from the list to the target directory. -
Method Summary
Methods inherited from class org.gjt.sp.util.Task
cancel, getLabel, getMaximum, getState, getStatus, getValue, isCancellable, run, setCancellable, setLabel, setMaximum, setStatus, setValue
-
Constructor Details
-
CopyFileWorker
Copy a file. Careful, it will overwrite the target.- Parameters:
comp
- the component that will be used as parent in case of errorsource
- the source pathtarget
- the target path (it is the file path, not a parent directory)
-
CopyFileWorker
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 errorsources
- the sources path to copytarget
- 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 theBehavior
will decide what to do.- Parameters:
comp
- the component that will be used as parent in case of errorsources
- the sources path to copytarget
- 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