Only allowing a file to be opened by one app
Only allowing a file to be opened by one app
- Subject: Only allowing a file to be opened by one app
- From: Andy Bettis <email@hidden>
- Date: Wed, 1 Jul 2009 16:47:03 +0100
Hi,
I'd like to set up my app so that if one user has a file open with it
another user cannot open the file. This only needs to limit access by
copies of my app, no need to block out any other process.
In the past I'd just leave a write access path open when the file was
opened from within my app - this would prevent anyone else from
getting write access (and therefore opening the file) and has the
bonus that if the app was closed down unexpectedly (these things
happen) then the 'lock' was removed. This doesn't happen with default
NSDocument based apps (like mine) - is there a way of doing it? Or a
better way of setting exclusive access?
Any help gratefully appreciated.
Love,
Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden