Skip to content

StefanFW/grsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grsync — golang rsync wrapper

Build Status codecov

This lib is a lightweight fork from zloylos/grsync with focus on rsync itself and some fixes. The stdout of the rsync command is that good to print it to stdout if necessary instead of wrapping it.

The history/fork was removed because of problems during go get. The work is based on the v1.5.0 release of zloylos/grsync.

Usage

All rsync configurations are available in the RsyncOptions struct.

To enable the detailed rsync output set the progress option to true.

To start the rsync process call the Run() method.

Example

package main

import (
	"github.com/schnes4/grsync"
)

func main () {
	rsyncOptions := grsync.RsyncOptions{
		Archive: true,
		Executability: true,
		Recursive: true,
		Progress: true,
		Delete: true,
		//...
	}

	rsync := grsync.NewRsync("source", "destination", rsyncOptions)
	err := rsync.Run()
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published