On Wed, Apr 22, 2009 at 10:48 PM, Mario Kušnjer <mario.kusn...@sb.t-com.hr> wrote: > So yes, what API should I be using that has the ability to perform writing > (and reading) to a file on disk (local or remote) without file-locking and > other options > related to this subject (that enables multiple users access the same file at > the asme time and perform actions on the same) ?
There isn't one. Network filesystems don't really support multiple access to a single file without locking. (They barely support it WITH locking.) Generally they will *allow* it, but it won't really *work*. The timing and order in which your writes will be visible to readers of the file will be nondeterministic. Basically, you're approaching this whole problem backwards. Cocoa and other OS X APIs are like toolboxes. They're full of neat things like hammers, screwdrivers, power drills, levels, tape measures, micrometers, etc. Meanwhile, you're asking the mechanical equivalent of "how do I build a bridge?" And you're trying to get an answer in the form of whether you should read the manual for the screwdriver or for the power drill. You're way too low level. You need to step back and ask the equivalent of whether you should build a suspension bridge or an arch bridge. You need to *design* your technique *first*. The APIs don't have anything to offer here. They give you the tools, but it's up to you to put them together into something that does what you want. Figure out how your application should work, *then* figure out what APIs you need to use to make it happen. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com