---
title: fileNamesFromRunningOpenPanel
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsdocumentcontroller/filenamesfromrunningopenpanel
---

# fileNamesFromRunningOpenPanel

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

## Declaration

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

## Discussion

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(_:), and it calls runModalOpenPanel(_:forTypes:) after initializing the Open panel (which includes getting the starting directory with currentDirectory). Returns nil if the user cancels the Open panel or makes no selection.

## See Also

### Deprecated Methods

- [documentForFileName:](appkit/nsdocumentcontroller/documentforfilename:.md)
- [fileExtensionsFromType:](appkit/nsdocumentcontroller/fileextensionsfromtype:.md)
- [makeUntitledDocumentOfType:](appkit/nsdocumentcontroller/makeuntitleddocumentoftype:.md)
- [makeDocumentWithContentsOfURL:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsofurl:oftype:.md)
- [makeDocumentWithContentsOfFile:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsoffile:oftype:.md)
- [openDocumentWithContentsOfFile:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsoffile:display:.md)
- [openDocumentWithContentsOfURL:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:.md)
- [openDocumentWithContentsOfURL:display:error:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:error:.md)
- [openUntitledDocumentOfType:display:](appkit/nsdocumentcontroller/openuntitleddocumentoftype:display:.md)
- [reopenDocumentForURL:withContentsOfURL:error:](appkit/nsdocumentcontroller/reopendocumentforurl:withcontentsofurl:error:.md)
- [setShouldCreateUI:](appkit/nsdocumentcontroller/setshouldcreateui:.md)
- [shouldCreateUI](appkit/nsdocumentcontroller/shouldcreateui.md)
- [typeFromFileExtension:](appkit/nsdocumentcontroller/typefromfileextension:.md)
