diff options
author | cjihrig <cjihrig@gmail.com> | 2014-12-15 18:44:46 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2014-12-15 20:05:49 +0300 |
commit | 165b70f146e163b82a09bb869463708516c08cf6 (patch) | |
tree | b7e91ef9f5984838dd5bbaedec9cf24012e4fb3a /src/node_constants.cc | |
parent | 524882faca28955aa5ef2a6194aab3895b0498b6 (diff) |
fs: add access() and accessSync()
fs.exists() and fs.existsSync() do not follow the typical
error first callback convention. access() and accessSync()
are added as alternatives in this commit.
Fixes: https://github.com/joyent/node/pull/8714
PR-URL: https://github.com/iojs/io.js/pull/114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
Diffstat (limited to 'src/node_constants.cc')
-rw-r--r-- | src/node_constants.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc index 45840d8653e..86fa544d19a 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1107,6 +1107,22 @@ void DefineSystemConstants(Handle<Object> target) { #ifdef S_IXOTH NODE_DEFINE_CONSTANT(target, S_IXOTH); #endif + +#ifdef F_OK + NODE_DEFINE_CONSTANT(target, F_OK); +#endif + +#ifdef R_OK + NODE_DEFINE_CONSTANT(target, R_OK); +#endif + +#ifdef W_OK + NODE_DEFINE_CONSTANT(target, W_OK); +#endif + +#ifdef X_OK + NODE_DEFINE_CONSTANT(target, X_OK); +#endif } void DefineUVConstants(Handle<Object> target) { |