Display flash drive label in touchscreen import menu

I'd like to display the label of a flash drive instead of the serverFolder.name property (USB-1 etc.) in the import menu to better discern connected flash drives (working on a raspberry Pi). I initially thought of adding a serverAction function to the import component, that calls an external command executing `lsblk -n -o LABEL /dev/sdaX` for each serverFolder, but since no callback/ return value is given, I can't use the obtained information easily.
Maybe it could be added to the serverFolderState directly? 

Also is there a way to detect wheter a flash drive is connected to a port at all. I don't need to display a port, that has no mounted drives.
Right now I check the `filesInPath` array of the RSBrowseFolder bfolder property for being empty, which works, but is kind of messy.


Comments

  • Actually the import is folder based and not directly related to drive, think of importing from a dropbox folder. Also I would need a cross platform c++ solution to give me the closes mount/drive from the path. What we use is https://www.boost.org/doc/libs/1_79_0/libs/filesystem/doc/reference.html and it seems to have no such function.

    Since we work on folders we can not check mounted drives. What might work is hiding them if the folder does not exist at the moment. Will check that but we not on next release, just finished with it and all is compiled:-)
Sign In or Register to comment.