0.0.1 • Published 7 years ago

filepick v0.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Filepick

A file picker made for node cli applications.

Documentation

Installation

npm install filepick --save

Methods

Get the full path of an selected file

filepick(directory, options) -> Promise

Options

  • question (string) Show the question for select the file. Default: 'Choose a file'.

Example

const filepick = require('filepick');

filepick('.', {
  question: 'Escolha um arquivo de backup'
}).then(file => {
  console.log('file', file);
}).catch(err => {
  console.log('Error Getting the file!', err);
});