From c8eaa11d0955d4de4979d06c3470c7408816a594 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Tue, 24 Mar 2015 19:20:09 +0100 Subject: [PATCH] add errno method --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 78dfa49..7386e34 100644 --- a/index.js +++ b/index.js @@ -79,6 +79,10 @@ exports.unmount = function (mnt, cb) { fuse.unmount(path.resolve(mnt), cb || noop) } +exports.errno = function (code) { + return exports[code.toUpperCase()] || -1 +} + exports.EPERM = -1 exports.ENOENT = -2 exports.ESRCH = -3