task

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

© Ben Garrett https://github.com/bengarrett/dupers

© Ben Garrett https://github.com/bengarrett/dupers

Index

Constants

View Source
const (
	Backup_   = "backup"
	Clean_    = "clean"
	Database_ = "database"
	DB_       = "db"
	Dupe_     = "dupe"
	Export_   = "export"
	Import_   = "import"
	LS_       = "ls"
	MV_       = "mv"
	RM_       = "rm"
	Search_   = "search"
	Up_       = "up"
	UpPlus_   = "up+"
)

Variables

View Source
var (
	ErrArgs      = errors.New("no buckets were given as arguments")
	ErrEmptyDB   = errors.New("the database is empty with no buckets")
	ErrToFewArgs = errors.New("too few arguments were given")
	ErrCommand   = errors.New("command is unknown")
	ErrNilFlags  = errors.New("flags cannot be a nil value")
	ErrNoArgs    = errors.New("arguments cannot be empty")
	ErrUserExit  = errors.New("cannot dupe check a directory that isn't stored as a bucket")
)

Functions

func CleanupDB

func CleanupDB(db *bolt.DB, c *dupe.Config) error

cleanupDB cleans and compacts the database.

func Database

func Database(db *bolt.DB, c *dupe.Config, args ...string) error

Database parses the commands that interact with the database.

func DatabaseHelp

func DatabaseHelp(w io.Writer)

DatabaseHelp creates the database command help.

func Debug

func Debug(a *cmd.Aliases, f *cmd.Flags) (string, error)

func Directories

func Directories() error

Directories checks the arguments for invalid escaped quoted paths when using the Windows cmd.exe shell.

func Dupe

func Dupe(db *bolt.DB, c *dupe.Config, f *cmd.Flags, args ...string) error

Dupe parses the dupe command.

func DupeExample

func DupeExample(w io.Writer)

DupeExample creates the examples of the dupe command.

func DupeHelp

func DupeHelp(w io.Writer)

DupeHelp creates the dupe command help.

func Help

func Help() string

Help, usage and examples.

func HelpDatabase

func HelpDatabase() string

func HelpDupe

func HelpDupe() string

func HelpSearch

func HelpSearch() string

func ProgramOpts

func ProgramOpts(w io.Writer)
func Search(db *bolt.DB, f *cmd.Flags, test bool, args ...string) error

Search parses the commands that handle search.

func SearchExample

func SearchExample(w io.Writer)

SearchExample creates the examples of the search command.

func SearchHelp

func SearchHelp(w io.Writer)

Search creates the search command help.

func SetStat

func SetStat(db *bolt.DB, c *dupe.Config, args ...string) error

SetStat sets and stats directories and files to scan, a bucket is the name given to database tables.

func StatSource

func StatSource(c *dupe.Config) error

StatSource checks the path arguments supplied to the dupe command.

func WalkScan

func WalkScan(db *bolt.DB, c *dupe.Config, f *cmd.Flags, args ...string) error

Types

This section is empty.

Directories

Path Synopsis
© Ben Garrett https://github.com/bengarrett/dupers
© Ben Garrett https://github.com/bengarrett/dupers
© Ben Garrett https://github.com/bengarrett/dupers
© Ben Garrett https://github.com/bengarrett/dupers
© Ben Garrett https://github.com/bengarrett/dupers
© Ben Garrett https://github.com/bengarrett/dupers

Jump to

Keyboard shortcuts

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