All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

prompt-for-files Function

Summary

Displays a dialog which returns multiple filenames.

Package

capi

Signature

prompt-for-files message &key pathname ok-check filter filters if-exists if-does-not-exist file-package-is-directory operation owner pane-args popup-args continuation => filenames, successp, filter-name

Arguments
message
A string or nil.
pathname
A pathname designator or nil.
ok-check
A function or nil.
filter
A string or nil.
filters
A property list.
if-exists
One of :ok or :prompt.
if-does-not-exist
One of :ok, :prompt or :error.
file-package-is-directory
A generalized boolean.
operation
One of :open or :save.
owner
An owner window.
pane-args
Arguments to pass to the pane.
popup-args
Arguments to pass to the confirmer.
continuation
A function or nil.
Values
filenames
A list.
successp
A boolean.
filter-name
A string.
Description

The function prompt-for-files presents the user with a dialog box similarly to prompt-for-file, but in which multiple filenames can be selected.

message, pathname, ok-check, filter, filters, if-exists, if-does-not-exist, file-package-is-directory, operation, owner, pane-args and popup-args are as for prompt-for-file, except on Microsoft Windows where the default value of filters is:

("MS Word files" "*.doc"
  "HTML files" "*.htm;*.html"
  "Plain Text files" "*.txt;*.text"
  "All files" "*.*")

On Cocoa and GTK+ the default value of filters is:

("Lisp Source Files" "*.lisp;*.lsp"
 "Text Documents" "*.txt;*.text"
 "All Files" "*.*")

which is the same default as for prompt-for-file.

filenames is a list of filenames, or nil if the user cancels the dialog.

successp is a flag which is nil if the dialog was cancelled, and t otherwise.

filter-name is the name of the filter that was selected in the dialog.

If continuation is non-nil, then it must be a function with a lambda list that accepts three arguments. continuation is called with the values that would normally be returned by prompt-for-files. On Cocoa, passing continuation causes the dialog to be made as a window-modal sheet and prompt-for-files returns immediately, leaving the dialog on the screen. The with-dialog-results macro provides a convenient way to create a continuation function.

Notes

prompt-for-files is not implemented on Motif.

See also

prompt-for-file


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42