Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 799 Bytes

README.md

File metadata and controls

39 lines (29 loc) · 799 Bytes

Node version

node-rsync

Rsync wrapper API for server-side javascript runtimes

NOTE: Requires rsync version 3.1.0 or greater

Features

  • Progress reporting
  • Typed rsync options
  • Set custom executable path
  • CJS + ESM exports
  • 0 dependencies

Install

yarn add @kyleupton/node-rsync

Example

import { setPath, copy } from '@kyleupton/node-rsync'

setPath('/opt/homebrew/Cellar/rsync/3.2.7_1/bin/rsync')

const res = await copy({
  source: '/Users/kyleupton/Downloads/',
  destination: '/Users/kyleupton/Documents/dest/',
  options: {
    archive: true
  },
  onProgress: (progress) => {
    console.log(progress)
  }
})