Re: [Rhythmbox-devel] Watched Directories

On Thu, 2005-10-20 at 11:25 +0200, Ernst Persson wrote:
> 2005/10/20, James Livingston <jrl ids org au>:
> > AFAIK there is no way to find out when a file is closed, but we can wait
> > until it has stopped changing to do the load. I've made it queue the
> > file loads for later, and they won't occur until the file hasn't been
> > changed for 5-10 seconds.
> I don't know about the fam api, but inotify sure knows about this!
> #define IN_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
> #define IN_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */
> /* helper events */
> #define IN_CLOSE		(IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */

FAM doesn't know about this, neiter does gnome-vfs. The way it's
implemented in Nautilus is that we don't try to read the file if it's
been modified less than .5 sec ago (on top of my head).

It would be easy enough for Rhythmbox to check whether the modified file
has been modified less than X amount of time ago and push the file back
at the bottom of the queue if it has, so that we can re-check it
slightly later.

Bastien Nocera <hadess hadess net> 
I mean, take Gladiator. Of course the cunt (Maximus) is going to die!
What the fuck's he gonna do if he doesn't - open a pizza parlour outside
the Coliseum and sell fucking autographs? -- Russell Crowe

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]