1.0.2 • Published 4 years ago
win-select-file v1.0.2
win-select-file
Windows OpenFileDialog Form.
install
npm i --save win-select-file
usage
import selectFolder from 'win-select-file';
const root = 'd://'; // default c://
const multiSelect = 1; // default 0
const checkFileExists = 0; // default 1
selectFolder({root, description, newFolderButton})
.then(result => {
if (result === 'cancelled') console.log('Cancelled by user');
else console.log(result); // logs selected file
})
.catch(err => console.error(err))
API winSelectFolder(options)
options
root
: defaults to 'c://'
multiSelect
: defaults to 0
checkFileExists
: defaults to 1
license
MIT (c) 2019 Glenn Vandeuren vandeurenglenn@gmail.com