canChooseFiles
canChooseFiles is a boolean property of the NSOpenPanel class in macOS AppKit. It controls whether the user is allowed to select files when an open panel is presented. The property is typically used alongside canChooseDirectories to tailor what the user can pick in the dialog.
Behavior and semantics: If canChooseFiles is true, the panel permits selecting files. If false, the user cannot
Usage examples: In Swift, you would configure an NSOpenPanel as follows:
panel.canChooseDirectories = false
panel.allowsMultipleSelection = true
NSOpenPanel *panel = [NSOpenPanel openPanel];
panel.canChooseDirectories = NO;
panel.allowsMultipleSelection = YES;
Related properties and considerations: canChooseDirectories is the complementary setting that enables directory selection. allowedFileTypes or allowedContentTypes
Platform specificity: canChooseFiles is part of macOS AppKit and is not available on iOS. On iOS, file