List of volumes on *nix

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

List of volumes on *nix

Post by ONEEYEMAN »

Hi, ALL,
wxFSVolume is now implemented on MSW/OSX.

What about *nix?

I now there is a way to get at least the name of the devices and the device type, but I think someone needs to just submit a patch for wx so it is included in the library.

DavidHart have this implemented, but for some reason he keeps it private in his own software...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: List of volumes on *nix

Post by doublemax »

I don't think Linux has anything equivalent to "volumes", as all drives are mounted somewhere below "/".

What kind of information do you need exactly and for what?
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: List of volumes on *nix

Post by ONEEYEMAN »

Hi,
I'm looking forva list of drives.

Thank you.
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: List of volumes on *nix

Post by DavidHart »

I'm looking forva list of drives.
Yes, but why? And what exactly do you mean by 'drives'? Hard discs? Floppies? Usb-pens? NFS or Samba mounts?
DavidHart have this implemented, but for some reason he keeps it private in his own software...
Your understanding of 'private' seems different from most people's. My code is FOSS. You have obviously seen it, and you are welcome to copy it, use it.
I now there is a way to get at least the name of the devices and the device type, but I think someone needs to just submit a patch for wx so it is included in the library.
I doubt if there's much point in doing that: I wrote it for 4Pane, a File Manager. What other sorts of program will care which disc, or disc type, they are reading from, writing to?

But if you feel there is a use-case, then by all means submit a patch to wx.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: List of volumes on *nix

Post by ONEEYEMAN »

Hi, David,
DavidHart wrote: Thu Feb 09, 2023 4:38 pm
I'm looking forva list of drives.
Yes, but why? And what exactly do you mean by 'drives'? Hard discs? Floppies? Usb-pens? NFS or Samba mounts?
I want to have a ownerdrawn combobox which will display an icon and volume/device name.
Under MSW/OSX its easy - all I will need is to display "C:". "D:", etc with the appropriate icon and whatever is availabe under OSX.
Under *nix I think I will need to display "/" as a hard drive, and then USB/CD-ROM icon with nothing (regular user will not know what /dev/sr0 is)
DavidHart have this implemented, but for some reason he keeps it private in his own software...
Your understanding of 'private' seems different from most people's. My code is FOSS. You have obviously seen it, and you are welcome to copy it, use it.
[/quote]
I guess it is. ;-)
My comment here was about the code not being included in wxWidgets, making it harder to do cross-platform.
DavidHart have this implemented, but for some reason he keeps it private in his own software...
I now there is a way to get at least the name of the devices and the device type, but I think someone needs to just submit a patch for wx so it is included in the library.
I doubt if there's much point in doing that: I wrote it for 4Pane, a File Manager. What other sorts of program will care which disc, or disc type, they are reading from, writing to?

But if you feel there is a use-case, then by all means submit a patch to wx.
[/quote]

You are the author - you should do it. ;-)
I mean you are familiar with the code and you know what needs to be done in order to make it work.

It will probably get you 5 minutes to extract it and submit a patch.

But it will make the life of me and other people easier - we will not need to add extra #ifdef in our code...

Thank you.
Post Reply