[Gambas-user] Usb

sundar j sundar_ima at ...251...
Wed Jul 31 04:02:15 CEST 2013


Use dbus component for reliable usb detection. Have a look at these links
http://gambasdoc.org/help/comp/gb.dbus?v3http://udisks.freedesktop.org/docs/1.0.5/Device.html#Device:DeviceFile


From: Kende Kriszti  n <nemh at ...2007...>
Sent: Tue, 30 Jul 2013 15:25:07 
To: gambas-user at lists.sourceforge.net
Subject: Re: [Gambas-user] Usb
> >> is it possible to list all the usb devices on a system?

> >>

> > Yeah, the lsusb command is your friend.

> >

> 

> I should have said usb drive I was thinking using dev some how

> 



No problem, I use this for pendrives:



Dim item, dev, name As String



For Each item In Dir("/dev/disk/by-id", "usb-*", gb.Link)



  dev = Stat("/dev/disk/by-id/" & item).Link

  dev = "/dev/" & Right(dev, - RInStr(dev, "/"))



  If Len(dev) = 8



    name = Right(item, -4)

    name = Left(name, RInStr(name, "_"))



    Print dev & " " & Replace(name, "_", " ")



  Endif



Next



This not work with HDDs.



------------------------------------------------------------------------------

Get your SQL database under version control now!

Version control is standard for application code, but databases havent 

caught up. So what steps can you take to put your SQL databases under 

version control? Why should you start doing it? Read more to find out.

http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

_______________________________________________

Gambas-user mailing list

Gambas-user at lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list