On Friday, August 17, 2012 6:49:14 PM UTC-7, Jimb Esser wrote:
>
> In actuality, fs.exists *only* has an err argument... or really a "not 
> err" argument.  "fs.exists" is just "not fs.stat".  If you want fs.exists 
> to have an error as the first argument, do "my_fs_exists = fs.stat", and 
> it'll have exactly the same results (though will be slightly faster).
>
> But, yeah, slightly awkwardly different signature, though the "err" 
> argument of an "exists" query is basically meaningless, and "exists" was 
> not originally part of the "fs" module, so it's understandable.
>

I don't think it's meaningless.
If the fs returns an I/O error, you can't say that the file doesn't exist.


-- 
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

Reply via email to