Documentation
¶
Overview ¶
Package dupers is the blazing-fast file duplicate checker and filename search.
Package dupers is the blazing-fast file duplicate checker and filename search.
Index ¶
- Variables
- func IsArchive(name string) (result bool, mime string, err error)
- func IsExtension(name string) (result bool, mime string)
- func Print(term string, quiet bool, m *database.Matches)
- type Bucket
- type Config
- func (i *Config) Buckets() []Bucket
- func (c *Config) Clean()
- func (i *Config) OpenDB()
- func (c *Config) Print()
- func (i *Config) PrintBuckets() string
- func (c *Config) Remove()
- func (c *Config) RemoveAll(clean bool)
- func (c *Config) Seek()
- func (i *Config) SetAllBuckets()
- func (i *Config) SetBuckets(names ...string)
- func (i *Config) SetCompares(name Bucket)
- func (i *Config) SetTimer()
- func (i *Config) SetToCheck(name string)
- func (c *Config) Status() string
- func (i *Config) Timer() time.Duration
- func (i *Config) ToCheck() string
- func (c *Config) WalkArchiver(name Bucket) error
- func (c *Config) WalkDir(name Bucket) error
- func (c *Config) WalkDirs()
- func (c *Config) WalkSource()
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoPath = errors.New("path does not exist") ErrPathExist = errors.New("path exists in the database bucket") )
Functions ¶
func IsArchive ¶ added in v0.0.4
IsArchive returns true if the read named file is compressed using a supported archive format.
func IsExtension ¶ added in v0.0.4
IsExtension returns true if the named file extension matches a supported archive format.
Types ¶
type Config ¶
type Config struct {
Debug bool // spam the feedback sent to stdout
Quiet bool // reduce the feedback sent to stdout
Test bool // internal unit test mode
// contains filtered or unexported fields
}
Config options for duper.
func (*Config) Clean ¶ added in v0.0.4
func (c *Config) Clean()
Clean removes all empty directories from c.Source. Directories containing hidden system directories or files are not considered empty.
func (*Config) PrintBuckets ¶ added in v0.0.4
func (i *Config) PrintBuckets() string
PrintBuckets returns a list of buckets used by the database.
func (*Config) Remove ¶ added in v0.0.3
func (c *Config) Remove()
Remove all duplicate files from the source directory.
func (*Config) RemoveAll ¶ added in v0.0.4
RemoveAll removes directories from the source directory that do not contain unique MS-DOS or Windows programs.
func (*Config) Seek ¶
func (c *Config) Seek()
Seek sources from the database and print out the matches.
func (*Config) SetAllBuckets ¶ added in v0.0.4
func (i *Config) SetAllBuckets()
SetAllBuckets sets all the database backets for use with the dupe or search.
func (*Config) SetBuckets ¶ added in v0.0.4
func (i *Config) SetBuckets(names ...string)
SetBuckets adds the bucket name to a list of buckets.
func (*Config) SetCompares ¶ added in v0.0.4
func (i *Config) SetCompares(name Bucket)
SetCompares fetches items from the named bucket and sets them to c.compare.
func (*Config) SetTimer ¶ added in v0.0.4
func (i *Config) SetTimer()
SetTimer starts a process timer.
func (*Config) SetToCheck ¶ added in v0.0.4
func (i *Config) SetToCheck(name string)
SetToCheck sets the named string as the directory or file to check.
func (*Config) ToCheck ¶ added in v0.0.4
func (i *Config) ToCheck() string
ToCheck returns the directory or file to check.
func (*Config) WalkArchiver ¶ added in v0.0.4
WalkArchiver walks the bucket directory saving the checksums of new files to the database. Any archived files supported by archiver will also have its content hashed. Archives within archives are currently left unwalked.
func (*Config) WalkDir ¶
WalkDir walks the named bucket directory for any new files and saves their checksums to the bucket.
func (*Config) WalkDirs ¶
func (c *Config) WalkDirs()
WalkDirs walks the named bucket directories for any new files and saves their checksums to the database.
func (*Config) WalkSource ¶
func (c *Config) WalkSource()
WalkSource walks the source directory or a file to collect its hashed content for future comparison.