Re: Lock a file in cocoa
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