fs-cp

copy a file or a stream to another file

  • fs-cp

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
fs-cp
1011.4.08 years ago10 years agoMinified + gzip package size for fs-cp in KB

Readme

cp
!NPM versionnpm-imagenpm-url !Build statustravis-imagetravis-url !Test coveragecoveralls-imagecoveralls-url !Dependency Statusdavid-imagedavid-url !Licenselicense-imagelicense-url !Downloadsdownloads-imagedownloads-url
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 () {

})