To create a directory in TypeScript
using Node.js
built-in fs
module, you can use the fs.mkdir()
method.
Here's an example:
index.ts140 chars7 lines
This code creates a new directory at the specified path.
The fs.mkdir()
method takes two arguments:
Note that you need to have the necessary permissions to create a new directory on the given path, and the path should not already exist.
gistlibby LogSnag