Node module that creates missing folders in the middle of a path, like mkdir -p
.
npm install @fcostarodrigo/open-path
npm install -g @fcostarodrigo/open-path
openPath --help
openPath <pathToOpen>
Positionals:
pathToOpen String with the path [string]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--fileInPath, -f Indicates if the last item of the path is a file [boolean]
const openPath = require("@fcostarodrigo/open-path");
async function main() {
await openPath("docs/UI");
fs.writeFileSync("docs/UI/button.txt", "test");
}
main();
openPath(pathToOpen, fileInPath);
pathToOpen
: String with the path.
fileInPath
: Indicates if the last item of the path is a file.
Returns a promise.