View other drives
Posted
#1
(In Topic #1440)
Guru

Posted
Guru

FileChooser.class ?
Did you set FileChooser.Root to "/" or to a folder?
If .Root property is / you should be able to see everything the system can.
If .Root property is set to a folder you can only see from that folder.
Maybe it's that?
Posted
Guru

<IMG src="https://www.cogier.com/gambas/FileChooserRoot.png">
</IMG>
Posted
Guru

Posted
Expert

/dev/disk/by-label
gets me all the installed disks I have with their label apart from the primary drive.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Guru

/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part1
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part2
/dev/disk/by-id/ata-Hitachi_HDT721010SLA360_STF607MS1R9MEK-part3
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y
/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4XBNZFN401278Y-part1
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357
/dev/disk/by-id/ata-V_Series_SATA_SSD_120GB_224710893500357-part1
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a4959842d-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713_1-part1
/dev/disk/by-id/nvme-WD_Blue_SN570_250GB_21353V640713-part1
/dev/disk/by-id/usb-USB2.0_External_Mass_Storage_Device_0010101640100D695
/dev/disk/by-id/wwn-0x5000cca35ed83bce
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part1
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part2
/dev/disk/by-id/wwn-0x5000cca35ed83bce-part3
/dev/disk/by-id/wwn-0x5002538ed04ec5f5
/dev/disk/by-id/wwn-0x5002538ed04ec5f5-part1
/dev/disk/by-id/wwn-0x5000000000000000
/dev/disk/by-id/wwn-0x5000000000000000-part1
Posted
Guru

cause I'm using mint and it has always used "/media" &/ User.Name
FileChooser1.Root = "/media" &/ User.Name
what does your file browser show is in /media/ ?
Posted
Guru

should list all mounted disks
Posted
Guru

Opps. This was a typing mistake when writing the post, the code was correct.Hmm, does your code have "User.Name" (with quotes) like your example or just User.Name
I have looked at this on 2 computers, just to make sure, both running Mint 22 and this is what shows, including hidden files.cause I'm using mint and it has always used "/media" &/ User.Name
<IMG src="https://www.cogier.com/gambas/NoFiles.png">
</IMG>what does your file browser show is in /media/ ?
<IMG src="https://www.cogier.com/gambas/MediaFiles.png">
</IMG>lsblk -o "MOUNTPOINT"| grep /
should list all mounted disks
<IMG src="https://www.cogier.com/gambas/lsblkMountpoint.png">
</IMG>The file browser, Nemo, shows my phone's Music folder as "mtp://HMD_Global_Nokia_X30_5G_H1X9FI1AL03B0800099/Internal shared storage/Music/" (With or without %20s for spaces) but Gambas does not want to Dir() that folder either.
<IMG src="https://www.cogier.com/gambas/MusicFolder.png">
</IMG>
Posted
Guru

maybe like this…
<HIGHLIGHT highlight="shell">
$ ls /run/user/1000/gvfs/
'mtp:host=Google_Pixel_8a_43221JEKB18852'
$ ls "/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852"/
'Internal shared storage'
$ ls "/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852/Internal shared storage"/
Alarms Audiobooks Documents Movies 'Music (1)' Notifications Podcasts Ringtones
Android DCIM Download Music Pictures Recordings
</HIGHLIGHT>
Posted
Guru

Code (gambas)
- 'Dim sFiles As String[] = Dir("/run/user/1000/gvfs/mtp:host=Google_Pixel_8a_43221JEKB18852/Internal shared storage")
1 guest and 0 members have just viewed this.


