PutFiles

Far Manager

PutFiles

The PutFiles function is called to put files to the file system emulated by the plugin. (FAR to plugin: "those files are for you, you should place then on your panel").
int WINAPI PutFiles(
  HANDLE hPlugin,
  struct PluginPanelItem *PanelItem,
  int ItemsNumber,
  int Move,
  int OpMode
);

Parameters

hPlugin
Plugin handle returned by OpenPlugin or OpenFilePlugin.
PanelItem
Points to an array of PluginPanelItem structures. Each structure describes a file to put.
ItemsNumber
Number of elements in the PanelItem array.
Move
If zero, files should be copied, if nonzergo - moved.
OpMode
Combination of the operation mode flags. This function should be ready to process OPM_SILENT flag. Also it can process OPM_DESCR.

If OPM_SILENT is not set, you can ask the user for confirmation and allow to edit destination path.

Return value

If the function succeeds, the return value must be 1 or 2. If the return value is 1, FAR tries to position the cursor to the most recently created file on the active panel. If the plugin returns 2, FAR does not perform any positioning operations. If the function fails, 0 should be returned. If the function was interrupted by the user, it should return -1.

Remarks

  1. If the operation has failed, but part of the files was successfully processed, the plugin can remove selection only from the processed files. To perform it, plugin should clear the PPIF_SELECTED flag for processed items in the PluginPanelItem list passed to function.
See also: