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

package march

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

Package march traverses two directories in lock step


Package Files


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
    NoCheckDest   bool            // transfer all objects regardless without checking dst
    // 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() error

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 12 packages (graph) and is imported by 10 packages. Updated 2020-02-28. Refresh now. Tools for package owners.