<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocumentController/fileNamesFromRunningOpenPanel",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocumentController(im)fileNamesFromRunningOpenPanel"
  },
  "title" : "fileNamesFromRunningOpenPanel"
}
-->

# fileNamesFromRunningOpenPanel

Returns a selection of files chosen by the user in the Open panel.

```
- (NSArray *) fileNamesFromRunningOpenPanel;
```

## Discussion

Each file in the returned `NSArray` is a fully qualified path to the file’s location in the file system. This method is called by [`openDocument(_:)`](/documentation/AppKit/NSDocumentController/openDocument(_:)), and it calls [`runModalOpenPanel(_:forTypes:)`](/documentation/AppKit/NSDocumentController/runModalOpenPanel(_:forTypes:)) after initializing the Open panel (which includes getting the starting directory with [`currentDirectory`](/documentation/AppKit/NSDocumentController/currentDirectory)). Returns `nil` if the user cancels the Open panel or makes no selection.

---

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)