currentDirectoryPath
The path to the program’s current directory.
Declaration
var currentDirectoryPath: String { get }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.