13NSFileManager - Cocoa and the File System

Cocoa provides a number of classes and categories that make dealing with the file system easier than using the lower-level Unix interfaces. NSFileManager encapsulates many file system operations, such as moving and renaming files and creating and resolving symbolic links. NSString has categories that make manipulating file paths easier, and starting with Mac OS X 10.6, NSURL has become the preferred way of identifying objects in the file system of interest.

Making and Manipulating Paths

Unix identifies objects in the file system with paths. A path is a listing of directories and optionally a filename, collectively known as path components, separated by a forward slash. Classic Mac OS, as well as parts ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.