vamtiger-copy-file
v0.0.9
Published
Copy a file from a defined source to destination path.
Downloads
260
Readme
VAMTIGER Copy File
VAMTIGER Copy File copies a file for a defined source and destination path.
Installation
VAMTIGER Copy File can be installed using npm or yarn:
npm i vamtiger-copy-file
or
yarn add vamtiger-copy-file
Usage
Import or require a referece to VAMTIGER Copy File:
import copyFile from 'vamtiger-copy-file';
or
const copyFile = require('vamtiger-copy-file').default;
VAMTIGER Copy File returns a Promise:
const params = {
source: 'some/source/file/path',
destination: 'some/destination/file/path'
};
copyFile(params)
.then(doSomething)
.catch(handleError);
Since VAMTIGER Copy File returns a Promise, the result can be more conveniently referenced within an async function:
async function someAsyncFunction() {
const params = {
source: 'some/source/file/path',
destination: 'some/destination/file/path'
};
await copyFile(params);
}