JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 982
  • Score
    100M100P100Q116722F
  • License MIT

copy a file or a stream to another file

Package Exports

  • fs-cp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fs-cp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cp

NPM version Build status Test coverage Dependency Status License Downloads

A tiny utility to help you copy files:

  • Always cleans up file descriptors
  • mkdir -p support
  • Promise support
  • No half-written files
  • Insusceptible to race conditions, meaning you can do multiple copies fine

API

var cp = require('fs-cp')

// file to file
cp('package.json', 'package2.json').then(function () {

})

// stream to file
cp(res, 'response.json').then(function () {

})