{"name":"move-file","version":"0.2.0","description":"Move a file - Even works across devices","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/move-file.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["move","file","mv","fs","stream","file-system","ncp","fast","quick","data","content","contents","devices","partitions"],"dependencies":{"cp-file":"^5.0.0","make-dir":"^1.1.0","path-exists":"^3.0.0"},"devDependencies":{"ava":"*","sinon":"^4.1.0","temp-write":"^3.3.0","tempy":"^0.2.1","xo":"*"},"gitHead":"69d55a2681f128c91220e725e056bb06d284312b","bugs":{"url":"https://github.com/sindresorhus/move-file/issues"},"homepage":"https://github.com/sindresorhus/move-file#readme","_id":"move-file@0.2.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-8zOOIhwX48NSq34mbg3VC/zaCv2MzCX71vVY9tvZxW9Ae3i/E3oZmHq9vBH2NsNJI2cEgkkW+W/jKgrEMeIzfA==","shasum":"f96c6826ab66d2155bdd69bfd908795327e86faa","tarball":"http://registry-npm.ywwl.com/move-file/download/move-file-0.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAz7777Pi/2KAZW8F7kjuXw89yvCORqNVuQP3+eNzK5XAiEAyu5lTkibKd47ro6Xvtc19LFDGM7uAoLwSz1pH9hBI0o="}],"size":2322,"noattachment":false,"key":"/move-file/-/move-file-0.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/move-file-0.2.0.tgz_1509710871387_0.5595400780439377"},"directories":{},"readme":"# move-file\n\n> Move a file\n\nThe built-in [`fs.rename()`](https://nodejs.org/api/fs.html#fs_fs_rename_oldpath_newpath_callback) is just a JavaScript wrapper for the C `rename(2)` function, which doesn't support moving files across partitions or devices. This module is what you would have expected `fs.rename()` to be.\n\n## Highlights\n\n- Promise API.\n- Supports moving a file across partitions and devices.\n- Optionally prevent overwriting an existing file.\n- Creates non-existent destination directories for you.\n\n## Install\n\n```sh\nnpm install move-file\n```\n\n## Usage\n\n```js\nimport {moveFile} from 'move-file';\n\nawait moveFile('source/unicorn.png', 'destination/unicorn.png');\nconsole.log('The file has been moved');\n```\n\n## API\n\n### moveFile(sourcePath, destinationPath, options?)\n\nReturns a `Promise` that resolves when the file has been moved.\n\n### moveFileSync(sourcePath, destinationPath, options?)\n\n#### sourcePath\n\nType: `string`\n\nThe file you want to move.\n\n#### destinationPath\n\nType: `string`\n\nWhere you want the file moved.\n\n#### options\n\nType: `object`\n\nSee [Options](#options-2).\n\n### renameFile(source, destination, options?)\n\nReturns a `Promise` that resolves when the file has been renamed. `source` and `destination` must be in the same directory.\n\n### renameFileSync(source, destination, options?)\n\n#### source\n\nType: `string`\n\nThe file you want to rename.\n\n#### destination\n\nType: `string`\n\nWhat you want to rename the file to.\n\n#### options\n\nType: `object`\n\nSee [Options](#options-2).\n\n### Options\n\n##### overwrite\n\nType: `boolean`\\\nDefault: `true`\n\nOverwrite existing destination file.\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe working directory to find source files.\n\nThe source and destination path are relative to this.\n\n##### directoryMode\n\nType: `number`\\\nDefault: `0o777`\n\n[Permissions](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) for created directories.\n\nIt has no effect on Windows.\n\n## Related\n\n- [move-file-cli](https://github.com/sindresorhus/move-file-cli) - CLI for this module\n- [cp-file](https://github.com/sindresorhus/cp-file) - Copy a file\n- [cpy](https://github.com/sindresorhus/cpy) - Copy files\n- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed\n","publish_time":1509710871633,"_cnpm_publish_time":1509710871633,"dist-tags":{"latest":"4.1.0"}}