Directory 创建目录(树)phantomjs casperjs不工作

Directory 创建目录(树)phantomjs casperjs不工作,directory,phantomjs,casperjs,Directory,Phantomjs,Casperjs,我正在使用Windows10x64 使用casperjs和phantomjs CasperJS版本1.1.2 at C:/CasperJS,使用phantomjs版本2.1.1 尝试创建多目录与它,但没有运气,唯一的工作是创建一个目录只 从文件 结果(路径更改) 将makedirectory更改为maketree它会工作的 var fs = require('fs'); var path = 'D:\\test2\\2ss\\hhh\\gu'; if(fs.makeTree(path)) co

我正在使用Windows10x64

使用casperjs和phantomjs

CasperJS版本1.1.2 at C:/CasperJS,使用phantomjs版本2.1.1

尝试创建多目录与它,但没有运气,唯一的工作是创建一个目录只

从文件

结果(路径更改)


将makedirectory更改为maketree它会工作的

var fs = require('fs');
var path = 'D:\\test2\\2ss\\hhh\\gu';
if(fs.makeTree(path))
console.log('"'+path+'" was created.');
else
console.log('"'+path+'" is NOT created.');
phantom.exit();
结果

D:\work>casperjs dir.js
"D:\test2\2ss\hhh\gu" was created.
var fs = require('fs');
var path = 'D:\\test2\\2ss\\hhh\\gu';
if(fs.makeTree(path))
console.log('"'+path+'" was created.');
else
console.log('"'+path+'" is NOT created.');
phantom.exit();
D:\work>casperjs dir.js
"D:\test2\2ss\hhh\gu" was created.