34,333
edits
Changes
→Identifying the Current Working Directory
currentPath = [filemgr currentDirectoryPath];
[filemgr release];
</pre>
In this code we declare a new object named filemgr that is an instance of the NSFileManager class and also an NSString object named ''currentPath'' to contain the current working directory path. Having created a file manager instance we then call the ''currentDirectoryPath'' method of that instance and assign the resulting string to ''currentPath''.
== Identifying the Documents Directory ==