var parts = dirPath.split(path.sep).filter((val) => val !== '');
// i add this code it can run in windows
if (os.platform() === 'win32') {
parts = parts.slice(1)
}
if (parts.length > 0 && path.isAbsolute(dirPath)) {
createPath(parts, rootDir());
}
else if (parts.length > 0) {
createPath(parts, process.cwd());
}
}
function mkdir(dirPath) { console.log("dirPath:" + dirPath + " " + path.sep);
// i add this code it can run in windows if (os.platform() === 'win32') { parts = parts.slice(1) } if (parts.length > 0 && path.isAbsolute(dirPath)) { createPath(parts, rootDir()); } else if (parts.length > 0) { createPath(parts, process.cwd()); } }