>
> files.map(function(file){
> fs.stat(file,function(stats){
> if(stats.isFile()){
> fs.readFile(file, function(err, theFile){
> //dosomething
> })
> }
> })
> })
>
I don't think this example is correct, the variable "file"
in fs.readFile(file, function(err, theFile) call will refer to one
instance for every callback on each "iteration" of map function. Most
probably you will end up reading one file. Please correct me if I'm wrong.
--
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