[Gambas-user] gb.inotify to capture filesystem events
Tobias Boege
taboege at ...626...
Wed Jan 22 16:24:58 CET 2014
Hi all,
a new component, gb.inotify, is public since some time (30th Dec 2013) but I
never told you... It is about monitoring filesystem events on Linux as you
may have already guessed from its name.
Since it lacks time over here to write documentation, ATM, I'll simply give
you a sample project which works with revision #6097. No! I'll give you TWO
sample projects: one small (watch-gambas-directory), one rather bloated but
more "elaborate" about the interface (test-inotify).
Note that race conditions are for free by the nature of the matter: external
events. There can be thousands of them before the kernel decides to run your
Gambas application to process them all. Files can be created, modified and
deleted; they may be long gone when your Gambas program gets to know they
are created!
I would like to hear about improvements for the interface (from the ones who
actually understand how it works) since we don't have any compatibility
requirements for this component yet. (Hint: the source code is small, so you
may look there if you are interested and the samples don't help you much.)
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-inotify-0.0.1.tar.gz
Type: application/octet-stream
Size: 5981 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140122/94a5a6fd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: watch-gambas-directory-0.0.1.tar.gz
Type: application/octet-stream
Size: 5137 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140122/94a5a6fd/attachment-0001.obj>
More information about the User
mailing list