1.1.1 • Published 7 years ago

@fibjs/copy v1.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

@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

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago