[maemo-developers] how to tell if files have changed?

From: Eero Tamminen eero.tamminen at nokia.com
Date: Fri Sep 21 11:12:29 EEST 2007
Hi,

ext Michael Wiktowy wrote:
>> Does maemo have anything like FAM or Gamin that tells us if watched
>> files or dirs have changed?
>>
>> I'm trying to improve Kagu's media scanning capabilities and it seems
>> that the best thing to do would be to get a notification of some sort
>> when a new file arrives, scan it, and act appropriately.
> 
> Don't both of those tools just tell you which files changed between
> subsequent scheduled scans? You still have to waste a buch of disk and
> cpu time on scanning and generating checksums on each file.
> 
> I think that what you are looking for comes with inotify ... but I am
> not sure how you hook into that or if it is even available on the
> N800/770. http://en.wikipedia.org/wiki/Inotify

Inotify will be available in the next release having Glibc 2.5.
You should be able to test it with the SDK Beta I think.

(you can use it also with Glibc 2.3 in earlier releases, but then you
need to do syscalls directly instead of using nice Glibc functions.)


> Could you not just look at the mtime of your monitored music
> directories on start up and compare it to what it was last time? That
> should tell you if files were added/removed/changed ... unfortunately
> you still have to scan to see which ones.
> 
> BTW ... Kagu is very nice. I have started using it as my default music
> player. Thanks.


	- Eero


More information about the maemo-developers mailing list