Open file browser (but not choosing files)

12 views
Skip to first unread message

supsm17

unread,
Mar 30, 2022, 2:31:44 AM3/30/22
to fltk.general
Hi there, is it possible to open the native file browser normally? I know that Fl_Native_File_Chooser exists, but I only want to open the file browser, not select any files. Essentially, I want my application to open a certain directory so users can edit files within the directory. It's sort of like the chrome option to "Show in folder" for downloads.

Ian MacArthur

unread,
Mar 30, 2022, 3:34:57 AM3/30/22
to fltk.general
On Wednesday, 30 March 2022 at 07:31:44 UTC+1 sups... wrote:
Hi there, is it possible to open the native file browser normally? I know that Fl_Native_File_Chooser exists, but I only want to open the file browser, not select any files. Essentially, I want my application to open a certain directory so users can edit files within the directory. It's sort of like the chrome option to "Show in folder" for downloads.

Um... what do you actually mean by "the native file browser" in this question?

The browser that Fl_Native_File_Chooser creates, is a "native file browser" on each system, and it can be opened in "file" or "directory" mode on those hosts that support such a distinction, so...?

I suspect that you are wanting to open whatever file manager tool the user currently has - e.g. the "Windows Explorer" on Win32, maybe Konqeror on KDE, that sort of thing?

If that is so, those are not accessed via fltk APIs, so you need to call into the system to get those - which is possible but does require some degree of detecting what the current system is and then adapting; under macOS and WIN32 that's not too hard, since there is usually only one option, but under *nix it can be trickier, though if the distro you use supports the xdesktop guidelines that may make it feasible...

Or I'm answering the wrong question by misinterpreting what was asked?

supsm17

unread,
Mar 31, 2022, 7:45:04 PM3/31/22
to fltk.general
That's what I was looking for, thanks for the assistance
Reply all
Reply to author
Forward
0 new messages