[Gambas-user] Pb instanciating inotify watch

Tony Morehen tmorehen at ajm-software.com
Thu Mar 7 01:11:09 CET 2019


gbAutoMount (Software Farm / System) uses udisks2 to monitor 
automounting of usb sticks.  It may help you.

On 2019-03-02 2:01 p.m., Alarc'h wrote:
> Hello,
>
> This message is more particularly intended for Tobias because it
> concerns the gb.inotify component.
>
> I want to make a small application that can detect the mounting or
> unmounting of usb sticks in the /media/username directory in order to
> be able to propose formatting or creating a bootable iso image on the
> key.
>
> I thought I would use inotify to detect these events and I saw that
> there was already a class dedicated to this. I downloaded two examples
> that Tobias proposed several years ago to this url:
>
> http://gambas.8142.n7.nabble.com/gb-inotify-to-capture-filesystem-events-td45299.html
>
> When I opened the projects I saw that he was instantiating Inotify
> objects, I think that was the name he had first thought of. The
> component documentation says to use Watch. I thought that by replacing
> Inotify with Watch in the code I would be able to use these examples,
> because one of them seems to do exactly what I need.
>
> But when I want to run his code:
>
> Dim hWatch As New Watch ("/tmp/gambas." & Str$(User.Id), True, 0) As
> "GambasDirectory"
>
> I get an error "too many arguments" ("trop d'arguments" my installation
> being in French).
>
> Which syntax should be correct?
>



More information about the User mailing list