PhantomJS - absolute



This method gives the absolute path where PhantomJS runs.

Syntax

Its syntax is as follows −

fs.absolute();

Example

Let us look at an example of the absolute method.

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

The above program generates the following output.

C:/phantomjs/bin
phantomjs_file_system_module_methods.htm
Advertisements