copyrecursive

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string, fileMode os.FileMode) error

func CopyToTempDir added in v0.2.9

func CopyToTempDir(root string) (string, *errorwrapper.Wrapper)

CopyToTempDir copies everything from root to a random tmp directory and returns the tmp root path

func Do

func Do(
	isClearBeforeCopy bool,
	src,
	dst string,
) *errorwrapper.Wrapper

func DoOptions

func DoOptions(
	src,
	dst string,
	options Options,
) *errorwrapper.Wrapper

func DoSimple

func DoSimple(src, dst string) error

DoSimple recursively copies a src directory to a destination.

Types

type Copier

type Copier struct {
	// contains filtered or unexported fields
}

func NewCopier

func NewCopier(
	src, dst string,
	opts Options,
) *Copier

func NewCopierUsingInstruction

func NewCopierUsingInstruction(
	instruction Instruction,
) *Copier

func (*Copier) Copy

func (it *Copier) Copy() *errorwrapper.Wrapper

type Instruction

type Instruction struct {
	SourceDestination
	Options
	// contains filtered or unexported fields
}

func (*Instruction) Clone added in v0.2.9

func (it *Instruction) Clone() *Instruction

func (*Instruction) Copier added in v0.2.9

func (it *Instruction) Copier() *Copier

func (*Instruction) Run

func (it *Instruction) Run() *errorwrapper.Wrapper

type Instructions

type Instructions struct {
	PathMapping []SourceDestination
	Options
}

type Options

type Options struct {
	IsSkipOnExist      bool
	IsRecursive        bool
	IsMove             bool
	IsClearDestination bool
	IsUseShellOrCmd    bool
	IsNormalize        bool
	IsExpandVar        bool
}

func NewDefaultOptions added in v0.2.9

func NewDefaultOptions() Options

func (Options) FixedPath

func (it Options) FixedPath(location string) string

type SourceDestination

type SourceDestination struct {
	Source, Destination string
}

Jump to

Keyboard shortcuts

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