This chapter covers working with the file system on Mac and iOS.
The recipes in this chapter will show you how to:
- Get a reference to the file manager
- Reference key directories for Mac and iOS
- Discover and change a file’s attributes
- Get a listing of files in a given directory
- Manage files and directories
- Use delegation with file manager
- Work with data using the
- Manage caching objects that take up lots of memory
4.1 Referencing and Using the File Manager
You need to work with your app’s file system.
Get a reference to your app’s
NSFileManager to work with the file system.
How It Works
NSFileManager is an Objective-C singleton object (see the note below for an explanation of singleton) ...