GetPluginDirList

Far Manager

GetPluginDirList

The GetPluginDirList function returns list of files in the specified directory (including subdirectories) in the file system emulated by a plugin.
int WINAPI GetPluginDirList(
  int PluginNumber,
  HANDLE hPlugin,
  const char *Dir,
  struct PluginPanelItem **pPanelItem,
  int *pItemsNumber
);

Parameters

PluginNumber
Number of the plugin module. It is passed to the plugin in the SetStartupInfo function.
hPlugin
Current plugin instance handle. If the plugin handle is equal to INVALID_HANDLE_VALUE, the value of PluginNumber is ignored and the function works with the plugin that controls the active panel.
Dir
Name of the plugin directory to scan. It must be in the form acceptable by the SetDirectory function of the plugin.

To keep the current plugin directory unchanged after the GetPluginDirList call, either Dir has to be a subdirectory of the current plugin directory, or the SetDirectory function of the plugin must be able to process a directory name returned by GetOpenPluginInfo. Otherwise the current directory will be changed and you should be ready to restore it.

pPanelItem
oints to the variable that will receive the address of an array of PluginPanelItem structures.
When this array is no longer needed, it must be passed to the FreeDirList function.
pItemsNumber
Points to the variable that will receive the count of PluginPanelItem structures.

Return value

If the function succeeds, the return value is TRUE. If the function fails or directory scanning is cancelled by the user, FALSE is returned.

Remarks

  1. Returned file names are relative to the specified directory. For example, if Dir is D:\DIR1\DIR2, file names will be in DIR2\file.ext format.
  2. The user can interrupt the directory scanning process by pressing Esc, which will cause the function to return FALSE.
See also: