@apexearth/copy

中文文档
1.4.5发布于 2020/04/13ISCCommonJS近 30 天下载 5303

通过节点或命令行复制文件!

中文使用文档
文档目录7 节
  1. 为什么?
  2. 安装
  3. 节点使用
  4. 命令行使用量
  5. 使用量
  6. 节点使用
  7. 命令行使用量

@ apexearth/ 副本

npm (scoped) Travis Status Coverage Status NPM Downloads install size License

通过命令行或节点.js复制文件.

为什么?

  • 通过国家保存恢复能力,可以复制数十万个文件,而不必重新开始.
  • 并行传输可以提高较小文件在Samba等网络连接上传输的速度.
  • 因为有时候你需要复制 许多 东西!

安装

节点使用

$ npm i @apexearth/copy

命令行使用量

$ npm i @apexearth/copy -g

使用量

节点使用

const copy = require('@apexearth/copy')
copy({
    from,                // Source copy path.
    to,                  // Destination copy path.
    recursive,           // Copy recursively.
    overwrite,           // Overwrite existing file
    overwriteMismatches, // Overwrite if size mismatch or from modified date is more recent.
    verbose,             // Verbose output.
    json,                // JSON output. (options: true, "pretty")
    ignoreErrors,        // Continue on errors.
    parallelJobs,        // Number of possible concurrent jobs.
    state,               // Save state for resume ability.
    stateFrequency,      // Save state frequency.
    copyFile,            // Supply your own copyFile function. (from, to, cb)
    readdir,             // Supply your own readdir function. (path, cb)
    stat,                // Supply your own stat function. (path, cb)
})
    .then(() => console.log('done'))
    .catch(err => console.error(err))

命令行使用量

Usage: node-copy [options] <from> <to>

Options:
  -V, --version               output the version number
  -r, --recursive             Copy recursively.
  -o, --overwrite             Overwrite existing.
  --overwrite-mismatches      Overwrite if size mismatch or from modified date is more recent.
  -v, --verbose               Verbose output.
  -j, --json <format>         JSON output. (options: true, pretty)
  -e, --ignore-errors         Ignore errors.
  -p, --parallel-jobs <n>     Number of possible concurrent jobs. (default: 1)
  -s, --state <file>          Save state to file for resume ability.
  --state-frequency <n>       Save state frequency. (In <n> files saved.) (default: 100)
  -a, --archive <state-file>  Attempt to copy as much as possible using options `-mervs <state-file> -p 4` with restart capabilities.
  -h, --help                  output usage information

版本与发布记录

@apexearth/copy 共发布 19 个版本,首次发布于 2019/03/02;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.4.5latest2020/04/136 年前
1.4.42019/09/127 年前
1.4.32019/07/137 年前
1.4.22019/07/117 年前
1.4.12019/06/257 年前
1.4.02019/03/147 年前

关于 @apexearth/copy 的常见问题

@apexearth/copy 是什么?

通过节点或命令行复制文件!

如何安装 @apexearth/copy?

在项目目录运行 npm install @apexearth/copy,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 node-copy,可以用 npx node-copy 直接运行。

@apexearth/copy 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/apexearth__copy 是否存在。

@apexearth/copy 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@apexearth/copy 可以商用吗?

@apexearth/copy 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@apexearth/copy 的下载量有多少?

根据 npm 官方下载统计,@apexearth/copy 在 2026/10/06 – 2026/11/04 这 30 天内被下载 5,303 次,日均约 177 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@apexearth/copy 还在维护吗?

最新版本 1.4.5 发布于 2020/04/13(6 年前);至今共发布 19 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/03/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。