Categorygithub.com/hut8/xam
modulepackage
0.0.0-20220705065749-e2f0145839cc
Repository: https://github.com/hut8/xam.git
Documentation: pkg.go.dev

# README

#+TITLE: xam

  • Introduction XAM is a filesystem metadatabase. It allows you to query a set of files for their metadata, such as asking which files are a specific size or which match a given hash.

As a command line utility, it generates a xam.csv file, which is sort of like md5deep.

assumes a working Go installation

go get github.com/constabulary/gb/... git clone github.com/hut8/xam cd xam gb vendor restore gb build mv bin/xam $WHEREVER_IN_PATH #+end_src

# Packages

No description provided by the author

# Functions

ComputeHashes loops over file data from input, hashes each, and passes it down the output channel.
HashFile hashes a file with SHA1 and returns the hash as a byte slice.
HashFileHex hashes a file with SHA1 and returns the hash as a hex string.
NewFileDB constructs a new FileDB instance given a slice of FileData instances.
No description provided by the author
No description provided by the author
NewIndexEntrySet creates and returns a reference to an empty set.
ReadCSV returns entries serialized by WriteCSV.
WalkFSTree passes each file encountered while walking tree into fileDataChan rootPath should be an absolute path.
WriteCSV serializeds xam.FileData instances to be read by ReadCSV.

# Structs

FileData represents attributes of file +gen * slice:"Where".
FileDB provides an in-memory database for querying duplicate files by size and SHA1.
No description provided by the author
IndexEntry is a (Hash, Size) Tuple +gen set.
No description provided by the author

# Type aliases

FileDataSlice is a slice of type *FileData.
HashCacheFunc allows hashes to be cached in a file.
IndexEntrySet is the primary type that represents a set.