3 ms·
Translating the original example, sans error throws: fs = require 'fs' fs.mkdir './hello', 0777, -> fs.writeFile './hello/world.txt', 'Hello!',
by jashkenas 15y ago
Translating the original example, sans error throws:
fs = require 'fs'
fs.mkdir './hello', 0777, ->
fs.writeFile './hello/world.txt', 'Hello!', ->
console.log 'File created with contents: '
fs.readFile './hello/world.txt', 'UTF-8', (err, data) ->
console.log data