Is there any way to open the specified directory and locate the file? #18243
-
It's easy to do under Windows, but I don't know what to do with Linux? Is there any generic code that can be implemented?Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
thevortexcloud
Feb 19, 2025
Replies: 1 comment 5 replies
-
Can you elaborate more on what you want to do? Avalonia's file picker APIs are the same for all platforms. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So you want to open the OS file browser? That's sort of complicated on Linux. There is no single or defacto file browser for Linux. Some file browsers may not even support the functionality you want. If you are targeting a specific distribution you can make some assumptions (even though they may still be wrong, EG it's possible to install Nautilus on KUbuntu, which out of the box uses Dolphin). The easiest generic thing you can probably do is run
xdg-open FOLDERPATH
to open the folder. Assuming the user:xdg-open
installedIt will probably work. If you give it the file path however it will try to open the actual file. The next more complicated thing you …