---
title: currentDirectory
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsdocumentcontroller/currentdirectory
---

# currentDirectory

The directory path to use as the starting point in the Open dialog.

## Declaration

```swift
var currentDirectory: String? { get }
```

## Discussion

Discussion The first valid directory from the following list is returned: The directory location where the current document was last saved The last directory visited in the Open panel The user’s home directory

## See Also

### Managing the Open Dialog

- [beginOpenPanel(completionHandler:)](appkit/nsdocumentcontroller/beginopenpanel(completionhandler:).md)
- [beginOpenPanel(_:forTypes:completionHandler:)](appkit/nsdocumentcontroller/beginopenpanel(_:fortypes:completionhandler:).md)
- [runModalOpenPanel(_:forTypes:)](appkit/nsdocumentcontroller/runmodalopenpanel(_:fortypes:).md)
- [urlsFromRunningOpenPanel()](appkit/nsdocumentcontroller/urlsfromrunningopenpanel().md)
