Skip to content

Instantly share code, notes, and snippets.

@joliss
Created April 1, 2014 21:55
Show Gist options
  • Save joliss/9923930 to your computer and use it in GitHub Desktop.
Save joliss/9923930 to your computer and use it in GitHub Desktop.
fs.mkdirSync('testdir')
var obj = {
'foo.txt': 'foo.txt contents',
'subdir': {
'bar.txt': 'bar.txt contents',
}
}
writeSync('testdir', obj) // write foo.txt and subdir/bar.txt to disk
readSync('testdir') // read it back => deep-equals obj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment