I’m developing a desktop app for Windows, Mac and Linux. Part of it is a File Manager considering SD cards. To evaluate if an SD card was removed or attached I have created a timer checking every second the current drive amount state versus the previous saved ones:
If FolderItem.DriveCount <> OSDriveCount Then
…
End If
This works like a charm on Windows and Mac but on Linux the FolderItem.DriveCount always returns 1 (probably 1 for the main hard disk). Based on the description in the online manual I would expect an attached SD card would also count on Linux as drive:
“The DriveCount function returns the number of mounted Drive.”
I’m experiencing this problem with Xojo 2022 - Release 4.1 and Ubuntu ARM64 22.04. After Ubuntu mentions the SD card is now mounted (and I can see it in shell: df -T) I’d expect the timer for DriveCount should fire but it doesn’t. I’m a Linux noob and don’t understand if this is a bug or just explainable behavior. If that is “normal” for Linux how else can I evaluate the REAL amount of attached drives?