<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOpenSavePanelDelegate/panel(_:didChangeToDirectoryURL:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOpenSavePanelDelegate(im)panel:didChangeToDirectoryURL:"
  },
  "title" : "panel(_:didChangeToDirectoryURL:)"
}
-->

# panel(_:didChangeToDirectoryURL:)

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

```
@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.

---

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)