January 2012
Beginner
655 pages
16h 35m
English
This chapter demonstrated how to write a file to the file system of the iPhone and how to read it back. In addition, you saw how structured data can be represented using a property list and how you can programmatically work with a property list using a dictionary object. The next chapter shows you how to use databases to store more complex data.
EXERCISES
Answers to the exercises can be found in Appendix D.
WHAT YOU LEARNED IN THIS CHAPTER
| TOPIC | KEY CONCEPTS |
| Subdirectories in each of the applications folders | Documents, Library, and tmp |
| Getting the path of the Documents folder |
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [paths objectAtIndex:0]; |
| Getting the path of the tmp directory |
-(NSString *) tempPath{
return NSTemporaryDirectory();
}
|
| Checking whether a file ... |