discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Tracking changes in the filesystem


From: Riccardo Mottola
Subject: Re: Tracking changes in the filesystem
Date: Wed, 11 Jan 2012 15:59:24 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20120104 Icedove/8.0

Hi,

I think GWorkspace does something like that and it uses the fswatcher daemon, but I never checked the details.

Riccardo

On 01/11/2012 10:28 AM, Andreas Höschler wrote:
Hi all,

my tool needs to get aware of any changes in the file system under a given 
directory (e.g. /home), for example if

• a new file is created in /home/tommy/Documents
• a file is removed anywhere below /home
• a file /home/herbert/test.conf gets modified
• ...

I think I have once seen some method of NSFileManager or NSWorkspace that does 
exactly that, but I don't know this for sure and I can't find anything suitable 
in the class references.

Any idea?

I could for sure iterate through the dir with contentsOfDirectoryAtPath: and 
compare the size and attributes of any file with log entries, but this seems 
rather cumbersome! :-(

Hints greatly appreciated!

Thanks a lot,

  Andreas


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep




reply via email to

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