bisync

package
v1.57.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package bisync implements bisync Copyright (c) 2017-2020 Chris Nelson

Package bisync implements bisync Copyright (c) 2017-2020 Chris Nelson

Package bisync implements bisync Copyright (c) 2017-2020 Chris Nelson

Package bisync implements bisync Copyright (c) 2017-2020 Chris Nelson Contributions to original python version: Hildo G. Jr., e2t, kalemas, silenceleaf

Index

Constants

View Source
const (
	DefaultMaxDelete     int    = 50
	DefaultCheckFilename string = "RCLONE_TEST"
)

Default values

View Source
const ListingHeader = "# bisync listing v1 from"

ListingHeader defines first line of a listing

Variables

View Source
var DefaultWorkdir = filepath.Join(config.GetCacheDir(), "bisync")

DefaultWorkdir is default working directory

View Source
var ErrBisyncAborted = errors.New("bisync aborted")

ErrBisyncAborted signals that bisync is aborted and forces exit code 2

View Source
var TZ = time.UTC

TZ defines time zone used in listings

Functions

func Bisync

func Bisync(ctx context.Context, fs1, fs2 fs.Fs, optArg *Options) (err error)

Bisync handles lock file, performs bisync run and checks exit status

Types

type CheckSyncMode

type CheckSyncMode int

CheckSyncMode controls when to compare final listings

const (
	CheckSyncTrue  CheckSyncMode = iota // Compare final listings (default)
	CheckSyncFalse                      // Disable comparison of final listings
	CheckSyncOnly                       // Only compare listings from the last run, do not sync
)

CheckSync modes

func (*CheckSyncMode) Set

func (x *CheckSyncMode) Set(s string) error

Set a CheckSync mode from a string

func (CheckSyncMode) String

func (x CheckSyncMode) String() string

func (*CheckSyncMode) Type

func (x *CheckSyncMode) Type() string

Type of the CheckSync value

type Options

type Options struct {
	Resync          bool
	CheckAccess     bool
	CheckFilename   string
	CheckSync       CheckSyncMode
	RemoveEmptyDirs bool
	MaxDelete       int // percentage from 0 to 100
	Force           bool
	FiltersFile     string
	Workdir         string
	DryRun          bool
	NoCleanup       bool
	SaveQueues      bool // save extra debugging files (test only flag)
}

Options keep bisync options

var Opt Options

Opt keeps command line options

Directories

Path Synopsis
Package bilib provides common stuff for bisync and bisync_test Package bilib provides common stuff for bisync and bisync_test Here it's got local file/directory helpers (nice to have in lib/file) Package bilib provides common stuff for bisync and bisync_test
Package bilib provides common stuff for bisync and bisync_test Package bilib provides common stuff for bisync and bisync_test Here it's got local file/directory helpers (nice to have in lib/file) Package bilib provides common stuff for bisync and bisync_test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL