@fibjs/copy

1.1.1 • Public • Published

@fibjs/copy

NPM version build status appveyor build status Test coverage David deps Known Vulnerabilities npm download

copy file or directory recursively asynchronously.

Install

$ npm i @fibjs/copy --save

Usage

const copy = require('@fibjs/copy');

copy('path to source', 'path to target');

copy('path to source', 'path to target', data => {
  // process the file buffer before write to the target
  return data.toString() + 'foo';
});

copy('path to source', 'path to target', (data, dir) => {
  if (dir.src.endsWith('xxx')) {
    // ignore this path
    return false;
  }
  return data;
});

copy('path to source', 'path to target', () => {
  // doing nothing
  return true;
});

Questions & Suggestions

Please open an issue here.

License

MIT

/@fibjs/copy/

    Package Sidebar

    Install

    npm i @fibjs/copy

    Weekly Downloads

    186

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • ngot-fibjs
    • ngot