Documentation
¶
Index ¶
- Constants
- func HumanizeSize(n float64) string
- func PopulateFiles(c *Config, filesToProcess chan<- string, directories []string, ...)
- func ProcessFiles(c *Config, filesToProcess <-chan string, fileHashes map[string]FileMetaSlice, ...)
- func Run(c *Config, args []string) ([][]string, error)
- type Config
- type FileMeta
- type FileMetaSlice
Constants ¶
View Source
const VERSION = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
func HumanizeSize ¶
HumanizeSize returns human readable representation of size in bytes
func PopulateFiles ¶
func PopulateFiles(c *Config, filesToProcess chan<- string, directories []string, wg *sync.WaitGroup)
PopulateFiles recurses through the list of directories adding files to be processed
func ProcessFiles ¶
func ProcessFiles(c *Config, filesToProcess <-chan string, fileHashes map[string]FileMetaSlice, lock *sync.Mutex, wg *sync.WaitGroup)
ProcessFiles computes hashes and updates map of hashes for files to be processed
Types ¶
type Config ¶
type Config struct {
Directories []string
Recurse bool
Symlinks bool
Hardlinks bool
NoEmpty bool
NoHidden bool
Sameline bool
Size bool
Summarize bool
Quiet bool
PrintVersion bool
NumWorkers int
Writer io.Writer
}
Config structure to store
type FileMetaSlice ¶
type FileMetaSlice []FileMeta
FileMetaSlice represents a FileMeta slice
func (FileMetaSlice) ContainsInode ¶
func (f FileMetaSlice) ContainsInode(fm FileMeta) (bool, int, error)
ContainsInode checks if the inode pointed to by the FileMeta is already contained in the FiletMetaSlice
func (FileMetaSlice) GetFilenames ¶
func (f FileMetaSlice) GetFilenames() []string
GetFilenames returns the list of filenames
Click to show internal directories.
Click to hide internal directories.