>
> 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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to