{"id":18483306,"url":"https://github.com/cloudcmd/move-files","last_synced_at":"2025-04-08T18:32:37.267Z","repository":{"id":57102595,"uuid":"132481529","full_name":"cloudcmd/move-files","owner":"cloudcmd","description":"move files","archived":false,"fork":false,"pushed_at":"2024-05-06T09:23:49.000Z","size":54,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T20:18:50.012Z","etag":null,"topics":["cloudcmd","emitter","filesystem","javascript","move","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudcmd.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-07T15:35:22.000Z","updated_at":"2024-05-06T09:23:52.000Z","dependencies_parsed_at":"2024-06-19T01:51:21.222Z","dependency_job_id":null,"html_url":"https://github.com/cloudcmd/move-files","commit_stats":{"total_commits":88,"total_committers":1,"mean_commits":88.0,"dds":0.0,"last_synced_commit":"ad6dd14ac70fbef51659d3dbcf3b445088d6aca1"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fmove-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fmove-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fmove-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudcmd%2Fmove-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudcmd","download_url":"https://codeload.github.com/cloudcmd/move-files/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247902526,"owners_count":21015463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudcmd","emitter","filesystem","javascript","move","nodejs"],"created_at":"2024-11-06T12:35:15.189Z","updated_at":"2025-04-08T18:32:33.931Z","avatar_url":"https://github.com/cloudcmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Move Files [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\nMove files with emitter and `zip` archives support. Try to `rename` files first, and only if fail copy them to destination and then remove from source.\n\n### Install\n\n```\nnpm i @cloudcmd/move-files\n```\n\n### How to use?\n\n```js\nconst moveFiles = require('@cloudcmd/move-files');\nconst cwd = process.cwd();\nconst from = `${cwd}/pipe-io`;\nconst to = `${cwd}/example`;\nconst abortOnError = false;\n\nconst mv = moveFiles(from, to, ['LICENSE', 'README.md', 'package.json']);\n\nmv.on('file', (from, to) =\u003e {\n    console.log(`${from} -\u003e ${to}`);\n});\n\nmv.on('directory', (from, to) =\u003e {\n    console.log(`${from} -\u003e ${to}`);\n});\n\nmv.on('progress', (percent) =\u003e {\n    console.log(percent);\n    \n    if (percent \u003e= 50) {\n        mv.pause();\n        mv.continue();\n    }\n});\n\nmv.on('pause', () =\u003e {\n    console.log('paused');\n    mv.continue();\n});\n\nmv.on('error', (error) =\u003e {\n    console.error(`${percent} -\u003e ${name}: ${error.message}`);\n    \n    mv.continue();\n});\n\nmv.on('end', () =\u003e {\n    console.log('Moving ended up');\n});\n\nmv.on('abort', () =\u003e {\n    console.log('Aborted');\n});\n\nmv.pause();\n```\n\n## Related\n\n- [Remy](https://github.com/coderaiser/node-remy \"Remy\") - Remove files with emitter.\n- [Jaguar](https://github.com/coderaiser/node-jaguar \"Jaguar\") - Pack and extract .tar.gz archives with emitter.\n- [OneZip](https://github.com/coderaiser/node-onezip \"OneZip\") - Pack and extract zip archives with emitter.\n- [Tar-to-zip](https://github.com/coderaiser/node-tar-to-zip \"tar-to-zip\") - Convert tar and tar.gz archives to zip.\n\n## License\n\nMIT\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@cloudcmd/move-files.svg?style=flat\n[BuildStatusURL]: https://github.com/cloudcmd/move-files/actions\n[BuildStatusIMGURL]: https://github.com/cloudcmd/move-files/actions/workflows/nodejs.yml/badge.svg\n[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat\n[CoverageIMGURL]: https://coveralls.io/repos/cloudcmd/move-files/badge.svg?branch=master\u0026service=github\n[NPMURL]: https://npmjs.org/package/@cloudcmd/move-files \"npm\"\n[LicenseURL]: https://tldrlegal.com/license/mit-license \"MIT License\"\n[CoverageURL]: https://coveralls.io/github/cloudcmd/move-files?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fmove-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudcmd%2Fmove-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudcmd%2Fmove-files/lists"}