---
title: "panel(_:didChangeToDirectoryURL:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsopensavepaneldelegate/panel(_:didchangetodirectoryurl:)"
---

# panel(_:didChangeToDirectoryURL:)

Tells the delegate that the user changed the selected directory to the directory located at the specified URL.

## Declaration

```swift
@MainActor optional func panel(_ sender: Any, didChangeToDirectoryURL url: URL?)
```

## Parameters

- `sender`: The panel whose directory changed.
- `url`: The URL of the new directory, or nil if it can’t be represented by an doc://com.apple.documentation/documentation/Foundation/NSURL object.

## See Also

### Responding to Panel Changes

- [panelSelectionDidChange(_:)](appkit/nsopensavepaneldelegate/panelselectiondidchange(_:).md)
- [panel(_:willExpand:)](appkit/nsopensavepaneldelegate/panel(_:willexpand:).md)
