Directory Paths on the iPhone and iPad

The correct way to retrieve the path of the documents directory in iOS is, according to Apple Documentation:

I never seem to be able to remember this when I need it. So I wrapped this and other directory related routines into a simple Objective-C class. Here’s what the interface looks like (I’ve removed the doxygen documentation for brevity):

A simple usage example would be:

Now this is not an earth-shattering piece of code, but it may save you some typing. You are free to download it and use it in your own projects.

Download
IDZDirectories.zip

About idz

A professional software engineer dabbling in iOS app development.
This entry was posted in Code Snippets and tagged . Bookmark the permalink.

Leave a Reply