ok - fam can tell me when somehting starts executing.. great.. :) BUT
somehting i think that's missing thats almost essential - monitoring
for read/write
the problem:
I'm writign a file manager (efm) - when files get "changed" i need to
re-evaluate them - that means if the mime type is image/* re-generate a
thumbnail... and that means openig file, read, generate thumb, write,
display.
the problem is the change event comes in whilste the file is still
being written it isnt finished yet - and theres no way to know if
someone is activel ywritign to the file- yes - i suppose i could use
fuser and check if tis opened - but it may beopened for read onyl- or
the writes maye be finsihed but the file nto close (maybe a log file of
some sort)
so beig able tohave events like:
file written at byte 16384 size 4096
file read at byte 300 size 256
etc.
woudl be greta - then at ;eats i could pause the thumbnail generation
until writes have stopped (ie no more write events for that file come
in, and then wait a small amoutn of time after each event comign in
before spawinging the thumbnail generator)
the problem si some files take a while to writ e- for example saving a
1024x768 png in gimp actually takes like 3 or 4 seconds.... and some
formats save instantly... so it'd be great to have a way of telling
this.. :) and sicne fam can alreayd tell when when things execute, i'm
sure it probabyl coudl tell me when they read/write :)
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
The Rasterman (Carsten Haitzler) raster@xxxxxxxxxxxxx raster@xxxxxxxxxxx
raster@xxxxxxxxxxxxxxxxx raster@xxxxxxxxx
raster@xxxxxxxxxx
--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx
|