@Stéphane Mons @Tim Jones — I think that Volumes in Xojo only take into account physical and logical disks/partitions. BTW, /opt and /home are mounting points, not volumes.
Actually, they are separate physical disks in my case and are listed by "mount" as such. This is why I'm confused as to why Volumes() and VolumeCount() don't list them and count them. I suspect that is a bug.
@David C This works for me on Linux:
Because I am only interested in physical volumes, Here is the old shell process that works:
// have to manually get the mounted volumes for now.
Dim theShell As New Shell
Dim theVolumes(-1) As String
theShell.Mode = 1
theShell.Execute "mount | grep ^/dev | cut -d ' ' -f 3"
Loop Until Not theShell.IsRunning
theVolumes = Split(theShell.ReadAll, EndOfLine)
for x = 0 to theVolumes.Ubound
If theVolumes(x) <> "" Then
lbBackupFilesystem.Cell(lbBackupFilesystem.LastIndex, TypeColumn) = "Volume"
lbBackupFilesystem.Cell(lbBackupFilesystem.LastIndex, MacPathColumn) = theVolumes(x)
lbBackupFilesystem.Cell(lbBackupFilesystem.LastIndex, UnixPathColumn) = theVolumes(x)
lbBackupFilesystem.RowPicture(lbBackupFilesystem.LastIndex) = RootVolume22x22
I'm going to create a Feedback report on this because Volumes() should handle this scenario for both physical and LVM volumes.