operations

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct {
	SearchGlobs []string

	DisableFilenameCheck bool
	DisableMovesCheck    bool
}

func (Add) Prepare

func (add Add) Prepare(
	currentArchive WorkingArchive,
	workingSubdirectory string,
) (AddPrepareResult, error)

type AddPrepareResult

type AddPrepareResult struct {
	NewFiles []string

	Moves []Move

	MissingFiles []string
}

func (AddPrepareResult) Execute

func (result AddPrepareResult) Execute(
	cmd *cobra.Command,
	currentArchive currentarchive.CurrentArchive,
) error

func (AddPrepareResult) PrintSummary

func (result AddPrepareResult) PrintSummary(
	cmd *cobra.Command,
	currentArchive currentarchive.CurrentArchive,
) error

type Move

type Move struct {
	From, To string
}

type Remove

type Remove struct {
	FileNames []string
}

func (Remove) Execute

func (remove Remove) Execute(
	cmd *cobra.Command,
	currentArchive currentarchive.CurrentArchive,
) error

type WorkingArchive

type WorkingArchive interface {
	archive.Reader
	archive.Writer

	FindAllFiles(searchGlobs ...string) ([]string, error)

	Contains(path string) bool
	FileChecksum(path string) (string, error)
	ComputeFileChecksum(path string) (string, error)

	VerifyFileExists(path string) (bool, error)

	StoredFiles() ([]string, error)
}

Jump to

Keyboard shortcuts

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