discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Read file modification


From: Matt Rice
Subject: Re: Read file modification
Date: Fri, 15 Jan 2010 02:45:56 -0800

On Fri, Jan 15, 2010 at 1:58 AM, FITHIS <vanag@telecom.ntua.gr> wrote:
> hi all,
>
> first of all excuse me for putting an erroneous subject in my previous
> posting.
>
> I was looking at an open source win32 app sumatra.pdf and I noticed that
> they use the cumbersome readdirectory API for detecting a file modification
> (and they also check if the file is still locked for writing before
> refreshing the pdf). After some research for a cross-platform way I noticed
> that a good cross-platform implementation is the QFileSystemWatcher.
> WxWidgets claims some reliability problems. Is there something like this in
> GNUStep? Is there a GNUstep way to detect file modification reliably and
> cross-platform?

There is really nothing like this in the OpenStep spec, so probably
nothing in GNUstep proper which does this,

in GWorkspace i believe this is done with fswatcher which uses
inotify, where available

http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/

for an overview of the mechanism which should work with gnustep you
can see this in the cocoa dev...

http://www.cocoadev.com/index.pl?FileSystemNotifications

rather than monitoring it at the filesystem level, it relies on the
application doing the modifying to post notifications which the
monitoring application listens for, then checks the attributes with
NSFileManager methods, such a cooperative effort tends to fall flat on
its face when non-gnustep applications are at all involved.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]