joyent/libuv

Document uv_fs_access better

Closed this issue · 1 comments

The docs leave much to be desired and are misleading. The second arg should be called amode or mode to line up with what's in the man page (currently it's flags which is a 4th arg to the long-form in the linux man page that is unrelated). Also it appears through testing that the only non-error result is 0 and all other results are uv errors. This is fine behavior, but it's taken me a while to figure out how this works or what it's even for.

Hi Tim! I fixed the parameter name in e03c0c7. As for the return code, same rule as any other libuv function applies, as documented: < 0 means error, success otherwise (which is usually 0).