Documentation
¶
Overview ¶
Package scanner provides file system scanning capabilities for the doppel duplicate file finder.
This package handles the initial phase of duplicate detection by:
- Recursively traversing directory structures
- Applying filters to exclude unwanted files and directories
- Grouping files by size to optimize duplicate detection
- Processing command-line directory arguments and removing subdirectories
The scanner works in conjunction with the filter package to efficiently collect candidate files for duplicate detection.
Index ¶
- func GetDirectoriesFromArgs(c *cli.Command) ([]string, error)
- func GroupFilesBySize(ctx context.Context, directories []string, filterConfig *filter.Config, ...) (map[int64][]FileInfo, error)
- func HashFile(filePath string, hasher hash.Hash, buf []byte) (string, error)
- func QuickHashFile(filePath string, size int64, hasher *xxh3.Hasher, buf []byte) (uint64, error)
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDirectoriesFromArgs ¶
GetDirectoriesFromArgs returns the directories to scan from command arguments.
func GroupFilesBySize ¶
func GroupFilesBySize(ctx context.Context, directories []string, filterConfig *filter.Config, stats *model.Stats, verbose bool) (map[int64][]FileInfo, error, )
GroupFilesBySize scans directories and groups files by their size.
Types ¶
Click to show internal directories.
Click to hide internal directories.