win-select-folder
v1.0.1
Published
Windows FolderBrowserDialog Form.
Downloads
226
Maintainers
Readme
win-select-folder
Windows FolderBrowserDialog Form.
install
npm i --save win-select-folder
usage
import selectFolder from 'win-select-folder';
const root = 'myComputer'; // rootfolder - default desktop
const description = 'some description'; // default Select Folder
const newFolderButton = 0; // whether or not to show the newFolderButton - default 1
selectFolder({root, description, newFolderButton})
.then(result => {
if (result === 'cancelled') console.log('Cancelled by user');
else console.log(result); // logs selected folder
})
.catch(err => console.error(err))
API winSelectFolder([options])
options
root
: rootfolder - check specialfolder for options, defaults to 'desktop'
description
: short description - defaults to 'Select Folder'
newFolderButton
: whether or not to show - defaults to 1
license
MIT (c) 2019 Glenn Vandeuren [email protected]