Get the path of the current directory in Finder (macOS) and Explorer (Windows)
$ npm install --save current-path
const currentPath = require('current-path');
currentPath().then(path => {
console.log(path);
//=> '/Users/sindresorhus/dev/current-path'
});
Returns a promise for the current directory in Finder or Explorer.
- current-path-cli - CLI for this module
MIT © Sindre Sorhus