{"_id":"copy-dereference","_rev":"4-1f3fe52a592ae14cc69c5eba3b62bbe3","name":"copy-dereference","description":"Copy files and directories, dereferencing symlinks and preserving last-modified times","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"copy-dereference","description":"Copy files and directories, dereferencing symlinks and preserving last-modified times","version":"1.0.0","author":{"name":"Jo Liss","email":"joliss42@gmail.com"},"main":"index.js","license":"MIT","repository":{"type":"git","url":"https://github.com/broccolijs/node-copy-dereference"},"dependencies":{},"gitHead":"c62c6a8ceb78151e12217292da1977a8ae0b9739","bugs":{"url":"https://github.com/broccolijs/node-copy-dereference/issues"},"homepage":"https://github.com/broccolijs/node-copy-dereference","_id":"copy-dereference@1.0.0","scripts":{},"_shasum":"6b131865420fd81b413ba994b44d3655311152b6","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"joliss","email":"joliss42@gmail.com"},"maintainers":[{"name":"joliss","email":"joliss42@gmail.com"}],"dist":{"shasum":"6b131865420fd81b413ba994b44d3655311152b6","tarball":"https://registry.npmjs.org/copy-dereference/-/copy-dereference-1.0.0.tgz","integrity":"sha512-40TSLuhhbiKeszZhK9LfNdazC67Ue4kq/gGwN5sdxEUWPXTIMmKmGmgD9mPfNKVAeecEW+NfEIpBaZoACCQLLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOBTIViujoT2DE/MsgKez15Ji0eRmawcfVkmmNm9mh0QIhAJRnazHXxrmECqv2cdNturtxQJjpwWa2Cq6kNhKPGmbp"}]}}},"readme":"# node-copy-dereference\n\nCopy a file or directory, dereferencing symlinks in the process, and\npreserving last-modified times and file modes.\n\nMade for use by Broccoli and Broccoli plugins.\n\n## Installation\n\n```sh\nnpm install --save copy-dereference\n```\n\n## Example\n\n```js\nvar copyDereferenceSync = require('copy-dereference').sync;\n\ncopyDereferenceSync('src_dir/some_file.txt', 'dest_dir/some_file.txt');\ncopyDereferenceSync('src_dir/some_dir', 'dest_dir/some_dir');\n```\n\n## Description\n\n```js\ncopyDereferenceSync(srcPath, destPath)\n```\n\nCopy the file or directory at `srcPath` to `destPath`.\n\nIf `srcPath` is a symlink, or if there is a symlink somewhere underneath the\ndirectory at `srcPath`, it will be dereferenced, that is, it will be replaced\nwith the thing it points to.\n\nFile & directory last-modified times as well as file modes (permissions &\nexecutable bit) will be preserved.\n\nWe throw an exception if there are any broken symlinks at or beneath\n`srcPath`, if `srcPath` does not exist, of if `destPath`'s parent directory\ndoes not exist.\n\nFurthermore, we throw an exception if `destPath` already exists. Thus in\ncontrast to Unix `cp`, the following will fail:\n\n```js\n// dest_dir already exists, and we might expect dest_dir/some_dir to be\n// created. This does not work; pass 'dest_dir/some_dir' instead.\ncopyDereferenceSync('src_dir/some_dir', 'dest_dir');\n```\n\nFile types other than files, directories and symlinks (such as device files or\nsockets) are not supported and will cause an exception.\n\n## Notes\n\n* There intentionally isn't an asynchronous version. It's not clear that we\nneed or want one. Before sending a patch to add an async version, please share\nyour use case on the issue tracker.\n","maintainers":[{"name":"joliss","email":"joliss42@gmail.com"}],"time":{"modified":"2022-06-13T23:15:45.188Z","created":"2014-07-19T19:24:26.707Z","1.0.0":"2014-07-19T19:24:26.707Z"},"homepage":"https://github.com/broccolijs/node-copy-dereference","repository":{"type":"git","url":"https://github.com/broccolijs/node-copy-dereference"},"author":{"name":"Jo Liss","email":"joliss42@gmail.com"},"bugs":{"url":"https://github.com/broccolijs/node-copy-dereference/issues"},"license":"MIT","readmeFilename":"README.md"}