File Picker for Command Line Applications using enquirer
npm install fc-filepick
Table of Contents generated with DocToc
- FC-Filepick
- Installation
- Methods
- Options
- Example
A file picker made for node cli applications using enquirer.

``bash`
yarn add -D fc-filepick
Select a directory
`js
const fcFilepicker = require("fc-filepick");
(async () => {
let dirLocation = await fcFilepicker();
console.info("Location of folder: ", dirLocation);
})();
`
Select a file
`js
const fcFilepicker = require("fc-filepick");
(async () => {
let fileLocation = await fcFilepicker({ type: "file" });
console.info("Location of file: ", fileLocation);
})();
`
- question (string) Show the question for select the file. _Default: 'Choose a file/folder'_.
- type (string) folder/file select a folder or file . _Default: 'folder'_.
- folder (string) Starting location of search. _Default: '.'_.
`javascript
const fcFilepicker = require("fc-filepick");
fcFilepicker({ type: "file" }).then(location => {
console.info("Location of file: ", fileLocation);
});
``