vamtiger-copy-file
Copy a file from a defined source to destination path.
Last updated 3 years ago by vamtiger-project .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vamtiger-copy-file 
SYNC missed versions from official npm registry.

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);
}

Current Tags

  • 0.0.9                                ...           latest (3 years ago)

6 Versions

  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |