| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Andreas,_______________________________________________
Thanks for your help. I have studied NSWorkspace and found that method
noteFileSystemChanged:(NSString *)path. It said it gets the status of all
the files and directories it is interested in and updates itself
appropriately. Do you think that can help? Do you have some sample code for
this?
Many thanks. :)
Regards,
Anthony
----- Original Message -----
From: "Andreas Schempp" <email@hidden>
To: "Anthony Cheung" <email@hidden>
Cc: <email@hidden>
Sent: Monday, April 28, 2003 10:10 PM
Subject: Re: File Detection
You can try to use the NSWorkspace notificationCenter to detect filesystemchanges.for
Register for NSWorkspaceDidPerformFileOperationNotification on the
[NSWorkspace notificationCenter]
This will tell you whenever ANYTHING on your disk is changed, I don't know
if this is too much...
Better let the user decide how often to check for folder changes (slidertimer).absolute
I don't think its too bad to check every - say - 2 minutes for new files.
I think NSFileManager would not work, because you have to define anpath. You can't specifie a folder, because the folder is not moved, copiedprovides
or renamed. Only it's content is changed.
Hello everyone,
I am writing a Cocoa application which detects what files are go into a
folder, that is a hot folder. I have checked NSFileManager whichNSFileManagera
delegate method - willProcessPath: . However, it seems that
anydoesn't have any notification center.
Then what I do is to attach a NSTimer and regularly check if there isofnew
file come into the folder. However, I am afraid that will involve a lotprocessor resource. Would you kindly suggest another method.
Regards,
Anthony Cheung
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.