Getting _recursive_ panel filelist

A place where plug-in developers can share their knowledge and experience.
Post Reply
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Getting _recursive_ panel filelist

Post 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?
User avatar
Centaur
Posts: 1083
Joined: Tue 05 Apr, 2005 20:09
Location: Novosibirsk, Russia
Been thanked: 2 times

Re: Getting _recursive_ panel filelist

Post 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.
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Getting _recursive_ panel filelist

Post 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.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Getting _recursive_ panel filelist

Post by pepak »

I have read that, but it only works with the active panel's plugin. I need the passive panel, too.
User avatar
t-rex
Страшный и ужасный
Posts: 4910
Joined: Tue 15 Mar, 2005 16:17
Location: Tel-Aviv
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: Getting _recursive_ panel filelist

Post by t-rex »

pepak
Unfortunately it is impossible in 1.7
Post Reply

Return to “Plug-In Developers”