rclone: github.com/ncw/rclone/fs/march Index | Files

package march

import "github.com/ncw/rclone/fs/march"

Package march traverses two directories in lock step

Index

Package Files

march.go

type March Uses

type March struct {
    // parameters
    Ctx           context.Context // context for background goroutines
    Fdst          fs.Fs           // source Fs
    Fsrc          fs.Fs           // dest Fs
    Dir           string          // directory
    NoTraverse    bool            // don't traverse the destination
    SrcIncludeAll bool            // don't include all files in the src
    DstIncludeAll bool            // don't include all files in the destination
    Callback      Marcher         // object to call with results
    // contains filtered or unexported fields
}

March holds the data used to traverse two Fs simultaneously, calling Callback for each match

func (*March) Run Uses

func (m *March) Run()

Run starts the matching process off

type Marcher Uses

type Marcher interface {
    // SrcOnly is called for a DirEntry found only in the source
    SrcOnly(src fs.DirEntry) (recurse bool)
    // DstOnly is called for a DirEntry found only in the destination
    DstOnly(dst fs.DirEntry) (recurse bool)
    // Match is called for a DirEntry found both in the source and destination
    Match(ctx context.Context, dst, src fs.DirEntry) (recurse bool)
}

Marcher is called on each match

Package march imports 10 packages (graph) and is imported by 8 packages. Updated 2019-06-25. Refresh now. Tools for package owners.