Interesting class newly added in the Mac OS X 10.7 Lion

As we know, in current frameworks for Mac OS X and iOS, lots of new mechanisms and classes have been added to utilize GCD or any other modern mechanism to maximize the use of CPU cores.

While I was following a tutorial for iCloud on iOS, I noticed a new class, or interface in Obj-C terminology, NSFileCoordinator.

Although we can distribute chores to multiple cores and CPUs using GCD, I wondered how about handling of files? And.. yes.. this NSFileCoordinator looks to be an interface for that.

Here is an explanation for the class.

The NSFileCoordinator class coordinates the reading and writing of files and directories among multiple processes and objects in the same process. You use instances of this class as-is to read from, write to, modify the attributes of, change the location of, or delete a file or directory. Before your code to perform those actions executes, though, the file coordinator lets registered file presenter objects perform any tasks that they might require to ensure their own integrity. For example, if you want to change the location of a file, other objects interested in that file need to know where you intend to move it so that they can update their references.

Availability : Mac OS X 10.7 Lion +, iOS 5.0+

About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 49 other followers

%d bloggers like this: