diff options
author | cjihrig <cjihrig@gmail.com> | 2018-04-02 15:12:57 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-04-05 23:11:20 -0400 |
commit | a16d88d9e9a6581e463082549823189aba25ca76 (patch) | |
tree | 6cc8d07304c9b1148f7e3dcf74e5dbb7b029d6b3 /lib | |
parent | 617946779c677e0669395cac8fbc2c0dace9da43 (diff) | |
download | android-node-v8-a16d88d9e9a6581e463082549823189aba25ca76.tar.gz android-node-v8-a16d88d9e9a6581e463082549823189aba25ca76.tar.bz2 android-node-v8-a16d88d9e9a6581e463082549823189aba25ca76.zip |
fs: expose copy-on-write flags for fs.copyFile()
This commit exposes the UV_FS_COPYFILE_FICLONE and
UV_FS_COPYFILE_FICLONE_FORCE flags added in libuv 1.20.0.
Fixes: https://github.com/nodejs/node/issues/19152
PR-URL: https://github.com/nodejs/node/pull/19759
Fixes: https://github.com/nodejs/node/issues/19152
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1916,7 +1916,15 @@ fs.mkdtempSync = function(prefix, options) { // Define copyFile() flags. Object.defineProperties(fs.constants, { - COPYFILE_EXCL: { enumerable: true, value: constants.UV_FS_COPYFILE_EXCL } + COPYFILE_EXCL: { enumerable: true, value: constants.UV_FS_COPYFILE_EXCL }, + COPYFILE_FICLONE: { + enumerable: true, + value: constants.UV_FS_COPYFILE_FICLONE + }, + COPYFILE_FICLONE_FORCE: { + enumerable: true, + value: constants.UV_FS_COPYFILE_FICLONE_FORCE + } }); |