node-modules/oss-syncer

Name: oss-syncer

Owner: node_modules

Description: synchronization all files from this bucket to another bucket

Created: 2015-07-15 09:09:21.0

Updated: 2018-05-25 08:03:03.0

Pushed: 2018-05-25 08:03:02.0

Homepage: null

Size: 17

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

oss-syncer

????? oss bucket?

Installation
m install oss-syncer
Usage
 strict'

t co = require('co')
t syncer = require('oss-syncer')

ee https://github.com/ali-sdk/ali-oss
t sourceConfig = {}
t targetConfig = {}
t options = {
urcePrefix: 'release/',
rgetPrefix: 'prepub/',
rce: true, // ??? true?? true ????????? source ?? target?? false ????
nore: false, // ??? false?? true ??????????????????????????????
epHeaders: ['cache-control'], // ????? oss header???????????????????

yncer.sync(sourceConfig, targetConfig, options)).catch(err => console.error(err.stack))

????????????? DEBUG=oss-syncer ???????

walk

oss-syncer ?????? walk ????????? oss bucket ?????????

 strict'
t syncer = require('oss-syncer')
t co = require('co')
t oss = require('ali-oss')
t config = require('./config')

t source = oss(config.source)

unction * () {
t num = 0
eld syncer.walk(source, '', function *(meta) {
num++

nsole.log('total nums: %s', num)

ch(err => console.error(err.stack))
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.