Instance Property

currentDirectoryPath

The path to the program’s current directory.

Declaration

@property(readonly, copy) NSString *currentDirectoryPath;

Discussion

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

Related Symbols

- createDirectoryAtPath:withIntermediateDirectories:attributes:error:

Creates a directory with given attributes at the specified path.

- changeCurrentDirectoryPath:

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