in-folder (a micropackage)
Temporarily change directories to run a callback
Installation
npm install in-folder
Usage
let inside = let console
If the current working directory was '/var', and '/var/lib' existed, then the output would be:
Folder: /var
Folder: /var/lib
Folder: /var
Notes
- Promises, if returned within the callback, will be resolved and returned by in-folder.
- Supports relative and absolute paths
- Uses process.chdir to change folders