current-path

Get the path of the current directory in Finder (macOS) and Explorer (Windows)

Usage no npm install needed!

<script type="module">
  import currentPath from 'https://cdn.skypack.dev/current-path';
</script>

README

current-path

Get the path of the current directory in Finder (macOS) and Explorer (Windows)

Usage

$ npm install current-path
import currentPath from 'current-path';

console.log(await currentPath());
//=> '/Users/sindresorhus/dev/current-path'

API

currentPath()

Returns a Promise<string> with current directory in Finder or Explorer.

Related