Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 615 Bytes

README.md

File metadata and controls

35 lines (25 loc) · 615 Bytes
***DEPRECATION NOTICE***

This library has been superseded by the new fs.copyFile function in node 8.5.

See documentation here:
https://nodejs.org/api/fs.html#fs_fs_copyfile_src_dest_flags_callback

fcopy

When there's a file in a place and a new place for the file.

Installation

npm install fcopy

Usage

const fcopy = require('fcopy');

// using callbacks
fcopy('./my-file', './my-new-file', function (err) {
    if (err) console.error(err);
});

// using promises
fcopy('./my-file', './my-new-file').then(function (err) {
    if (err) console.error(err);
});