<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/FileManager/currentDirectoryPath",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileManager(py)currentDirectoryPath"
  },
  "title" : "currentDirectoryPath"
}
-->

# currentDirectoryPath

The path to the program’s current directory.

```
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(_:)`](/documentation/Foundation/FileManager/changeCurrentDirectoryPath(_:)) method.

> Warning:
> This property reports the current working directory for the current process, not just the receiver.

## See Also

[`createDirectory(atPath:withIntermediateDirectories:attributes:)`](/documentation/Foundation/FileManager/createDirectory(atPath:withIntermediateDirectories:attributes:))

Creates a directory with given attributes at the specified path.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)