• 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
Re: Lock a file in cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lock a file in cocoa


  • Subject: Re: Lock a file in cocoa
  • From: John Joyce <email@hidden>
  • Date: Fri, 19 Mar 2010 15:50:29 -0500

>
>
> This seems like a case where it might be good to know why you need to
> prevent a file from being trashed. There is probably a better way to
> accomplish what you need.
>
> _murat
>
> O

It's not even Cocoa.
What you are looking for is either file permissions (bad idea)
OR
keeping data in an intermediary state/storage location UNTIL it is ok to dump it.

So have whatever on the desktop (not the wisest place for a file) but copy and keep open/working data to a file in Application Support where it belongs. On quit/save, copy data out to desired file/filename/location/URL.
To the user, this would all be opaque and seem like it's only the original file.
To the app, everything will be where it needs to be while needed.

_______________________________________________

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

  • Prev by Date: App modal window and secondary thread
  • Next by Date: Re: NSComboBox problem in 10.6.2
  • Previous by thread: Re: Lock a file in cocoa
  • Next by thread: FREED(id)
  • Index(es):
    • Date
    • Thread