diff options
author | cjihrig <cjihrig@gmail.com> | 2017-09-06 19:54:29 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-09-08 07:08:04 +0300 |
commit | 11b7428832466dd6933e9c26deaf3a4ce1d33cef (patch) | |
tree | 2c6f16d6e32170bd6149b34ff21a939c5d236a1d /src/node_constants.cc | |
parent | 62813615049aba50ef99af052b23532f2fb35eef (diff) |
fs: add fs.copyFile{Sync}
Fixes: https://github.com/nodejs/node/issues/14906
PR-URL: https://github.com/nodejs/node/pull/15034
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/node_constants.cc')
-rw-r--r-- | src/node_constants.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc index 263909f8cd3..f8055f01e6d 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -1164,10 +1164,6 @@ void DefineSystemConstants(Local<Object> target) { #endif } -void DefineUVConstants(Local<Object> target) { - NODE_DEFINE_CONSTANT(target, UV_UDP_REUSEADDR); -} - void DefineCryptoConstants(Local<Object> target) { #if HAVE_OPENSSL NODE_DEFINE_STRING_CONSTANT(target, @@ -1274,12 +1270,15 @@ void DefineConstants(v8::Isolate* isolate, Local<Object> target) { DefineErrnoConstants(err_constants); DefineWindowsErrorConstants(err_constants); DefineSignalConstants(sig_constants); - DefineUVConstants(os_constants); DefineSystemConstants(fs_constants); DefineOpenSSLConstants(crypto_constants); DefineCryptoConstants(crypto_constants); DefineZlibConstants(zlib_constants); + // Define libuv constants. + NODE_DEFINE_CONSTANT(os_constants, UV_UDP_REUSEADDR); + NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_EXCL); + os_constants->Set(OneByteString(isolate, "errno"), err_constants); os_constants->Set(OneByteString(isolate, "signals"), sig_constants); target->Set(OneByteString(isolate, "os"), os_constants); |