Package ghidra.framework.main.datatree

# Class PasteFileTask

java.lang.Object
ghidra.util.task.Task
ghidra.framework.main.datatree.PasteFileTask

All Implemented Interfaces:
  `MonitoredRunnable`

public class PasteFileTask extends Task
Task to paste files at given destination folder.

- ## Field Summary

  ### Fields inherited from class ghidra.util.task.Task

  `taskMonitor, waitForTaskCompleted`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PasteFileTask(DomainFolderNode destNode, List<GTreeNode> list, boolean isCut)`
  Constructor for PasteFileTask.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `run(TaskMonitor monitor)`
  This is the method that will be called to do the work

  ### Methods inherited from class ghidra.util.task.Task

  `addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, setHasProgress`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PasteFileTask

    public PasteFileTask(DomainFolderNode destNode, List<GTreeNode> list, boolean isCut)
    Constructor for PasteFileTask.
    Parameters:
      `destNode` - destination folder
      `list` - list of GTreeNodes being pasted
      `isCut` - boolean flag, true means source nodes were cut instead of copied.

- ## Method Details

  - ### run

    public void run(TaskMonitor monitor) throws CancelledException
    Description copied from class: `Task`
    This is the method that will be called to do the work

    Note: The run(TaskMonitor) method should not make any calls directly on Swing components, as these calls are not thread safe. Place Swing calls in a Runnable, then call `Swing.runLater(Runnable)` or `Swing.runNow(Runnable)`to schedule the Runnable inside of the AWT Event Thread.

    Specified by:
      `run` in class `Task`
    Parameters:
      `monitor` - The TaskMonitor that will monitor the executing Task
    Throws:
      `CancelledException` - if the task is cancelled. Subclasses can trigger this exception by calling `TaskMonitor.checkCancelled()`. This allows them to break out of the current work stack.