+1 I looked at the Node's source, and indeed path.exists (to be fs.exists) is just wrapper over fs.stat.
If there's no "lighter" way for checking whether path exists, indeed it's best it it's not in the API at all. There are already two good reasons for that: it encourages bad practices and it's asynchronous function that doesn't follow convention. On Thursday, May 31, 2012 7:21:07 PM UTC+2, P. Douglas Reeder wrote: > > FWIW, I found path.exists() to be odd when I was first learning Node, and > didn't understand how things worked. > > Given that there's a straightforward replacement, I see no reason it can't > be removed as part of a major update. > -- 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
