O'Reilly logo

Objective-C Phrase Book, Second Edition by David Chisnall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. Accessing Directories and Files

If you’re using AppKit, you have two options for most filesystem-related tasks. The NSFileManager class, from the Foundation framework, provides a lot of low-level methods for manipulating files and directories. The NSWorkspace class from the Application Kit provides more abstract forms.

A number of the functions of NSWorkspace are delegated to the workspace process. On old NeXT systems, this was a single program, whereas on OS X, various bits of its functionality are implemented by the window server and the Finder.

Because of this, it doesn’t make sense to think about using the higher-level versions when the workspace process is not guaranteed to be present—for example, in command-line tools that might be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required