prompt-for-directory message &key if-does-not-exist pathname ok-check pane-args popup-args owner
The function prompt-for-directory
prompts the user for a directory pathname using a dialog box. The initial directory is pathname . Like all the prompters, prompt-for-directory
returns two values: the directory pathname and a flag indicating success. The success flag will be nil
if the dialog was cancelled, and t
otherwise. An ok-check function can be specified, which should return non- nil
if a given pathname is valid.
if-does-not-exist is one of :ok
, :prompt
or :error
. When set to :ok
, a nonexistent directory can be chosen. When set to :prompt
, if a non existent directory is chosen, the user is prompted for whether the directory should be created. When set to :error
, the user cannot choose a non existent directory. The default is :prompt
.
owner is a capi top-level interface which becomes the owner of the dialog. In a CAPI callback, this defaults to the current interface. Otherwise an interface is chosen for the current thread.
Finally, as with all of the prompting functions, the prompt itself is created by passing an appropriate pane to popup-confirmer
. Arguments can be passed to the make-instance
of the pane and the call to popup-confirmer
using pane-args and popup-args respectively. Currently, the pane used to create the file prompter is internal to the CAPI.