joyent/node — Issue #2096: fs.unlink on directory causes UNKNOWN error
Author: TrevorBurnham
Created: 2011-11-14 02:45:34+00:00
State: open

If `'dir'` is a directory, then `fs.unlinkSync('dir')` throws, and `fs.unlink` passes,

Error: UNKNOWN, unknown error 'foo'

(tested on Node 0.6.1 under OS X). Is it possible to generate a more precise error? For comparison, `rm dir` provides the output

rm: dir: is a directory