{"_id":"fs-copy-file-sync","_rev":"217998","name":"fs-copy-file-sync","description":"fs.copyFileSync ponyfill","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2021-06-03T15:37:44.000Z","created":"2017-09-18T15:12:19.489Z","1.1.1":"2018-05-06T09:29:21.227Z","1.1.0":"2018-05-03T11:15:50.440Z","1.0.1":"2017-09-18T15:13:36.559Z","1.0.0":"2017-09-18T15:12:19.489Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git://github.com/coderaiser/fs-copy-file-sync.git"},"versions":{"1.1.1":{"name":"fs-copy-file-sync","version":"1.1.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"fs.copyFileSync ponyfill","homepage":"http://github.com/coderaiser/fs-copy-file-sync","keywords":["ponyfill","copy","file","copyFileSync","fs"],"repository":{"type":"git","url":"git://github.com/coderaiser/fs-copy-file-sync.git"},"scripts":{"test":"tape test/*.js","lint":"redrun lint:*","lint:lib":"eslint lib","lint:test":"eslint --rule 'no-console:0' test","watch:test":"npm run watcher -- \"npm test\"","watcher":"nodemon -w lib -w test -x","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","wisdom":"npm run build","6to5":"buble lib -o legacy","build":"redrun 6to5 legacy","prebuild":"rimraf legacy","legacy":"echo \"module.exports = require('./fs-copy-file-sync');\" > legacy/index.js"},"dependencies":{},"license":"MIT","engines":{"node":">=0.8"},"main":"legacy/fs-copy-file-sync.js","devDependencies":{"babel-eslint":"^8.0.0","buble":"^0.19.2","coveralls":"^3.0.0","eslint":"^4.0.0","nodemon":"^1.11.0","nyc":"^11.0.2","pullout":"^1.0.1","redrun":"^6.0.0","rimraf":"^2.6.2","tape":"^4.2.0","try-catch":"^2.0.0"},"gitHead":"99bc169db74ac2b165c4f19cb3a6013d33797451","bugs":{"url":"https://github.com/coderaiser/fs-copy-file-sync/issues"},"_id":"fs-copy-file-sync@1.1.1","_npmVersion":"6.0.0","_nodeVersion":"10.0.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"11bf32c096c10d126e5f6b36d06eece776062918","size":3543,"noattachment":false,"key":"/fs-copy-file-sync/-/fs-copy-file-sync-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-copy-file-sync/download/fs-copy-file-sync-1.1.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-copy-file-sync_1.1.1_1525598961144_0.4066428317112536"},"_hasShrinkwrap":false,"publish_time":1525598961227,"_cnpm_publish_time":1525598961227},"1.1.0":{"name":"fs-copy-file-sync","version":"1.1.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"fs.copyFileSync ponyfill","homepage":"http://github.com/coderaiser/fs-copy-file-sync","keywords":["ponyfill","copy","file","copyFileSync","fs"],"repository":{"type":"git","url":"git://github.com/coderaiser/fs-copy-file-sync.git"},"scripts":{"test":"tape test/*.js","lint":"redrun lint:*","lint:lib":"eslint lib","lint:test":"eslint --rule 'no-console:0' test","watch:test":"npm run watcher -- \"npm test\"","watcher":"nodemon -w lib -w test -x","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","wisdom":"npm run build","6to5":"buble lib -o legacy","build":"redrun 6to5 legacy","prebuild":"rimraf legacy","legacy":"echo \"module.exports = require('./fs-copy-file-sync');\" > legacy/index.js"},"dependencies":{},"license":"MIT","engines":{"node":">=0.8"},"main":"legacy/fs-copy-file-sync.js","devDependencies":{"babel-eslint":"^8.0.0","buble":"^0.19.2","coveralls":"^3.0.0","eslint":"^4.0.0","nodemon":"^1.11.0","nyc":"^11.0.2","pullout":"^1.0.1","redrun":"^6.0.0","rimraf":"^2.6.2","tape":"^4.2.0","try-catch":"^2.0.0"},"gitHead":"5ac16bf0bfed9ca9489b1211c45c0cefcf3823d8","bugs":{"url":"https://github.com/coderaiser/fs-copy-file-sync/issues"},"_id":"fs-copy-file-sync@1.1.0","_npmVersion":"6.0.0","_nodeVersion":"10.0.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"8f9e5d5d7bb5c7a0ec1b0126f93b687b24085f42","size":3510,"noattachment":false,"key":"/fs-copy-file-sync/-/fs-copy-file-sync-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-copy-file-sync/download/fs-copy-file-sync-1.1.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-copy-file-sync_1.1.0_1525346150380_0.3280032362597123"},"_hasShrinkwrap":false,"publish_time":1525346150440,"_cnpm_publish_time":1525346150440},"1.0.1":{"name":"fs-copy-file-sync","version":"1.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"fs.copyFileSync ponyfill","homepage":"http://github.com/coderaiser/fs-copy-file-sync","keywords":["ponyfill","copy","file","copyFileSync","fs"],"repository":{"type":"git","url":"git://github.com/coderaiser/fs-copy-file-sync.git"},"scripts":{"test":"tape test/*.js","lint":"redrun lint:*","lint:lib":"eslint lib","lint:test":"eslint --rule 'no-console:0' test","watch:test":"npm run watcher -- \"npm test\"","watcher":"nodemon -w lib -w test -x","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","wisdom":"npm run build","6to5":"buble lib -o legacy","build":"redrun 6to5 legacy","prebuild":"rimraf legacy","legacy":"echo \"module.exports = require('./fs-copy-file-sync');\" > legacy/index.js"},"dependencies":{},"license":"MIT","engines":{"node":">=0.8"},"main":"legacy/fs-copy-file-sync.js","devDependencies":{"buble":"^0.15.1","coveralls":"^2.11.6","eslint":"^4.0.0","nodemon":"^1.11.0","nyc":"^11.0.2","pullout":"^1.0.1","redrun":"^5.9.2","rimraf":"^2.6.2","tape":"^4.2.0","tar-fs":"^1.14.0"},"gitHead":"6e859377f8b78a0b731a28b8f32ddf6f65a3c482","bugs":{"url":"https://github.com/coderaiser/fs-copy-file-sync/issues"},"_id":"fs-copy-file-sync@1.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"fc93d25af984ab94b8a751c3e1df055d1afea204","size":3020,"noattachment":false,"key":"/fs-copy-file-sync/-/fs-copy-file-sync-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-copy-file-sync/download/fs-copy-file-sync-1.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-copy-file-sync-1.0.1.tgz_1505747615659_0.0849680204410106"},"directories":{},"publish_time":1505747616559,"_cnpm_publish_time":1505747616559,"_hasShrinkwrap":false},"1.0.0":{"name":"fs-copy-file-sync","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"fs.copyFileSync ponyfill","homepage":"http://github.com/coderaiser/fs-copy-file-sync","keywords":["ponyfill","copy","file","copyFileSync","fs"],"repository":{"type":"git","url":"git://github.com/coderaiser/fs-copy-file-sync.git"},"scripts":{"test":"tape test/*.js","lint":"redrun lint:*","lint:lib":"eslint lib","lint:test":"eslint --rule 'no-console:0' test","watch:test":"npm run watcher -- \"npm test\"","watcher":"nodemon -w lib -w test -x","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","wisdom":"npm run build","6to5":"buble lib -o legacy","build":"redrun 6to5 legacy","prebuild":"rimraf legacy","legacy":"echo \"module.exports = require('./fs-copy-file-sync');\" > legacy/index.js"},"dependencies":{},"license":"MIT","engines":{"node":">=0.8"},"main":"legacy/fs-copy-file-sync.js","devDependencies":{"buble":"^0.15.1","coveralls":"^2.11.6","eslint":"^4.0.0","nodemon":"^1.11.0","nyc":"^11.0.2","pullout":"^1.0.1","redrun":"^5.9.2","rimraf":"^2.6.2","tape":"^4.2.0","tar-fs":"^1.14.0"},"gitHead":"fb6ef30f05e1505721a52e5c145eba1ba23dce49","bugs":{"url":"https://github.com/coderaiser/fs-copy-file-sync/issues"},"_id":"fs-copy-file-sync@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"799d68c9f9334d75dfb9bfff2fa66622ad40277d","size":2956,"noattachment":false,"key":"/fs-copy-file-sync/-/fs-copy-file-sync-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fs-copy-file-sync/download/fs-copy-file-sync-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-copy-file-sync-1.0.0.tgz_1505747538568_0.7777195335365832"},"directories":{},"publish_time":1505747539489,"_cnpm_publish_time":1505747539489,"_hasShrinkwrap":false}},"readme":"fs-copy-file-sync [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n=========\nNode.js v8.5.0 [fs.copyFileSync](https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_copyfilesync_src_dest_flags) [ponyfill](https://ponyfill.com).\n\nSynchronously copies src to dest. By default, dest is overwritten if it already exists. Returns undefined. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.\n\n## Install\n\n```\nnpm i fs-copy-file-sync-sync\n```\n\n## API\n\n`flags` is an optional integer that specifies the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).\n\n- `fs.constants.COPYFILE_EXCL` - The copy operation will fail if dest already exists.\n- `fs.constants.COPYFILE_FICLONE` - The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then a fallback copy mechanism is used.\n- `fs.constants.COPYFILE_FICLONE_FORCE` - The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then the operation will fail.\n\n\nExample:\n\n```js\nconst copyFileSync = require('fs-copy-file-sync');\n\n// destination.txt will be created or overwritten by default.\ncopyFileSync('source.txt', 'destination.txt');\nconsole.log('source.txt was copied to destination.txt');\n```\n\n\nIf the third argument is a number, then it specifies flags, as shown in the following example.\n\n```js\nconst copyFileSync = require('fs-copy-file-sync');\nconst { COPYFILE_EXCL } = copyFileSync.constants;\n\n// By using COPYFILE_EXCL, the operation will fail if destination.txt exists.\nfs.copyFileSync('source.txt', 'destination.txt', COPYFILE_EXCL);\n```\n\n## Related\n\n- [fs-copy-file](https://github.com/coderaiser/fs-copy-file \"fs-copy-file\") - Asynchronously copies src to dest.\n\n## License\nMIT\n\n[NPMIMGURL]:                https://img.shields.io/npm/v/fs-copy-file-sync.svg?style=flat\n[BuildStatusIMGURL]:        https://img.shields.io/travis/coderaiser/fs-copy-file-sync/master.svg?style=flat\n[DependencyStatusIMGURL]:   https://img.shields.io/gemnasium/coderaiser/fs-copy-file-sync.svg?style=flat\n[LicenseIMGURL]:            https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[CoverageIMGURL]:           https://coveralls.io/repos/coderaiser/fs-copy-file-sync/badge.svg?branch=master&service=github\n[NPMURL]:                   https://npmjs.org/package/fs-copy-file-sync \"npm\"\n[BuildStatusURL]:           https://travis-ci.org/coderaiser/fs-copy-file-sync  \"Build Status\"\n[DependencyStatusURL]:      https://gemnasium.com/coderaiser/fs-copy-file-sync \"Dependency Status\"\n[LicenseURL]:               https://tldrlegal.com/license/mit-license \"MIT License\"\n[CoverageURL]:              https://coveralls.io/github/coderaiser/fs-copy-file-sync?branch=master\n\n","_attachments":{},"homepage":"http://github.com/coderaiser/fs-copy-file-sync","bugs":{"url":"https://github.com/coderaiser/fs-copy-file-sync/issues"},"license":"MIT"}