Javascript: Create directory recursively if not exists.

function createFileIfNotExists(dirName) {
    if (!fs.existsSync(dirName)) {
        fs.mkdirSync(dirName, {
            recursive: true,
        });
    }
}