Documentation
¶
Overview ¶
© Ben Garrett https://github.com/bengarrett/dupers
Index ¶
- Constants
- Variables
- func Bucket(s string) parse.Bucket
- func Print(quiet, exact bool, term string, m *database.Matches) string
- func PrintWalk(lookup bool, c *Config) string
- type Config
- func (c *Config) CheckPaths() (ok bool, files, buckets int)
- func (c *Config) Checksum(name, bucket string) error
- func (c *Config) Clean() string
- func (c *Config) Print() string
- func (c *Config) Read(bucket, name, ext string)
- func (c *Config) Read7Zip(bucket, name string)
- func (c *Config) Remove() string
- func (c *Config) Removes() string
- func (c *Config) Status() string
- func (c *Config) WalkArchiver(name parse.Bucket) error
- func (c *Config) WalkDir(name parse.Bucket) error
- func (c *Config) WalkDirs()
- func (c *Config) WalkSource() error
Constants ¶
const (
WinOS = "windows"
)
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct {
Debug bool // Debug spams technobabble to stdout.
Quiet bool // Quiet the feedback sent to stdout.
Test bool // Test toggles the internal unit test mode.
parse.Parser
}
Config options.
func (*Config) CheckPaths ¶
CheckPaths counts the number of files in a directory to check and the number of buckets.
func (*Config) Clean ¶
Clean removes all empty directories from c.Source. Directories containing hidden system directories or files are not considered empty.
func (*Config) Read ¶ added in v1.0.1
Read opens the named archive, hashes and saves the content to the bucket.
func (*Config) Read7Zip ¶ added in v1.0.1
Read7Zip opens the named 7-Zip archive, hashes and saves the content to the bucket.
func (*Config) Removes ¶ added in v1.0.1
Removes the directories from the source that do not contain unique MS-DOS or Windows programs.
func (*Config) WalkArchiver ¶
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 to add their checksums to the database.
func (*Config) WalkDirs ¶
func (c *Config) WalkDirs()
WalkDirs walks the named bucket directories for any new files to add their checksums to the database.
func (*Config) WalkSource ¶
WalkSource walks the source directory or a file to collect the hashed content for a future comparison.