Skip to content

Commit

Permalink
update docs to include enhanced walkSync
Browse files Browse the repository at this point in the history
  • Loading branch information
mawni committed Dec 31, 2016
1 parent f6e2109 commit 96dd0c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,15 +452,19 @@ recommend this resource as a good starting point: https://strongloop.com/strongb

### walkSync(dir)

Lists all files inside a directory recursively
Lists all files and directories along with their `fs.stats`, inside a directory recursively.

Returns an array of objects. Each object has `path` and `stats` properties.

`@return: [{path: '', stats: {}}]`.

Examples:

```js
var fs = require('fs-extra')

var files = fs.walkSync('/home/jprichardson')
// files = ['/home/jprichardson/file1', '/home/jprichardson/dir1/file2']
// files = [{path: '/home/jprichardson/dir1', stats: {}}, {path: '/home/jprichardson/file1', stats: {}}]
```

### writeJson(file, object, [options], callback)
Expand Down

0 comments on commit 96dd0c1

Please sign in to comment.