PhantomJS - 绝对 path



此方法提供 PhantomJS 运行的绝对路径。

语法

其语法如下 −

fs.absolute();

示例

让我们看一个 absolute 方法的示例。

var fs = require('fs'); 
var cwd = fs.absolute("."); 
console.log(fs);

以上程序生成以下 输出

C:/phantomjs/bin
phantomjs_file_system_module_methods.htm
广告