Instance Property


The path to the program’s current directory.


@property(readonly, copy) NSString *currentDirectoryPath;


The current directory path is the starting point for any relative paths you specify. For example, if the current directory is /tmp and you specify a relative pathname of reports/info.txt, the resulting full path for the item is /tmp/reports/info.txt.

When an app is launched, this property is initially set to the app’s current working directory. If the current working directory is not accessible for any reason, the value of this property is nil. You can change the value of this property by calling the changeCurrentDirectoryPath: method.

See Also

Managing the Current Directory

- changeCurrentDirectoryPath:

Changes the path of the current working directory to the specified path.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software