@teambun/coscp
Efficient file transfer for QCloud COS.
Last updated 2 years ago by m31271n_ .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @teambun/coscp 
SYNC missed versions from official npm registry.

coscp

code style: prettier NPM Downloads

Efficient file transfer for QCloud COS.

Features

  • Concurrency Support
  • Report Sheet
  • Enable / Disable / Customize HTTP Cache

Installation

$ npm install -g @teambun/coscp

Config

$ coscp gen-config

After generating ~/.coscprc.yml, read instructions in the file, set it properly.

Usage

$ coscp source bucket:target

Cache Policy

Default cache policy for development without --cache option:

File Type / File Name Expire
All 60 seconds

Cache policy for production with --cache auto option:

File Type / File Name Expire
*.html, *.stale.* 60 seconds
Others 1 year

Customize cache policy with --cache option, such as:

  • --cache 0: disable cache.
  • --cache 3600: set cache time to 1 hour.

Programmatic API

async function coscp(sourceDirectory, targetDirectory, concurrency, config, interactive, cache)

Argument Type Default Value
sourceDirectory String NA
targetDirectory String NA
concurrency Number 5
config Object{ AppId, SecretId, SecretKey, Bucket, Region } NA
interactive Boolean true
cache Number NA

TODO

  1. multiple file transfer https://stackoverflow.com/a/21110306/1793548
  2. download coscp bucket:files local

LICENSE

MIT

Current Tags

  • 3.1.0                                ...           latest (2 years ago)

5 Versions

  • 3.1.0                                ...           2 years ago
  • 3.0.4                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (10)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |