Page 1 of 1

Getting _recursive_ panel filelist

Posted: Tue 19 Aug, 2008 13:51
by pepak
I need to read all files and directories in a panel and all of its subdirectories. Which is quite easy to do with regular panels (it's just a matter of reading CurDir from the Panel and then using that to recursively call GetDirList). I am not so sure how to do it with plugin-based panels. I expect the code will be pretty much the same, except that I need to use GetPluginDirList instead of GetDirList. But I just can't figure out what parameters to use:

Code: Select all

int WINAPI GetPluginDirList(
  int PluginNumber,
  HANDLE hPlugin,
  const char *Dir,
  struct PluginPanelItem **pPanelItem,
  int *pItemsNumber
);
Dir, pPanelItem and pItemsNumber are the same as GetDirList and pretty obvious. I need to know how to get PluginNumber and hPlugin from PanelInfo. There just doesn't seem to be any way to find these values. PanelInfo does have a Plugin member, but that's just a boolean value according to the docs - and in any case, even if it did contain a handle, I would need the PluginNumber, too. What am I overlooking?

Re: Getting _recursive_ panel filelist

Posted: Tue 19 Aug, 2008 14:06
by Centaur
As far as I understand, there is no provision for plugin interoperation in FAR. That is, FAR can talk to plugins and plugins can talk to FAR, but, generally, plugins cannot talk to other plugins.

Re: Getting _recursive_ panel filelist

Posted: Wed 20 Aug, 2008 05:19
by t-rex
pepak
You should read the Plugin API help for GetPluginDirList:

Code: Select all

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.

Re: Getting _recursive_ panel filelist

Posted: Wed 20 Aug, 2008 05:24
by pepak
I have read that, but it only works with the active panel's plugin. I need the passive panel, too.

Re: Getting _recursive_ panel filelist

Posted: Wed 20 Aug, 2008 21:03
by t-rex
pepak
Unfortunately it is impossible in 1.7