What i want is to create a function to read files and return the files to
the caller.
This code is not working!
my func in coffeescript
fs = require('fs')
InitLoadTasks =->
a=[]
fs.readdir __dirname+ '/toRun', (err, files) ->
if (err)
console.log(err)
a=files
initLoadTasks()
reads files from directory
how do i return the a array as a return value to InitLoadTasks?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en