Returns or handles matched files from the given directory.
(String?
= process.cwd()
)
directory to open files from (defaults to working directory)
Array<Object>
:
files if
RETURN
is the selected strategy
Creates a FilesProvider
(Object?= {})
options
Name | Description |
---|---|
$0.regex RegExp?= null
|
the regex to match the files with |
$0.single Number?
(default PROMPT )
|
strategy for handling a single file
HANDLE|RETURN
|
$0.multi Number?
(default PROMPT_AND_HANDLE )
|
strategy for handling multiple files
HANDLE|PROMPT|RETURN|PROMPT_AND_HANDLE
|
$0.choiceAll Boolean?
(default true )
|
if
true
a choice to select all files is included when multiple files are found
|
$0.handler function?= null
|
function to call when
HANDLE|PROMPT_AND_HANDLE
strategies are selected
|
$0.promptHeader String?= defaultPromptHeader
|
header when prompting user to select a file |
$0.promptFooter String?= defaultPromptFooter
|
footer when prompting user to select a file |
FilesProvider
:
the files provider