Add example for "fs.isAbsolute"

gh-pages
Joe DF 2014-10-28 21:34:47 -04:00
parent 21a409a47c
commit 4d569c1e67
1 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,15 @@ permalink: api/fs/method/is-absolute.html
```javascript
var fs = require('fs');
// @TODO: Finish fs.isAbsolute example.
var path = '/Full/Path/To/test.txt';
// isAbsolute(path) returns true if the specified path is an absolute path.
if (fs.isAbsolute(path))
console.log('"'+path+'" is an absolute path.');
else
console.log('"'+path+'" is NOT an absolute path.');
phantom.exit();
```