• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Only allowing a file to be opened by one app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Only allowing a file to be opened by one app
      • From: Michael Ash <email@hidden>
  • Prev by Date: Reading and writing rtf(d) files
  • Next by Date: Re: How Do I Statically Link to libcurl?
  • Previous by thread: Re: Reading and writing rtf(d) files
  • Next by thread: Re: Only allowing a file to be opened by one app
  • Index(es):
    • Date
    • Thread