Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Root folder of this project, needs to be changed if root.go (this file) is moved relative to the root folder Root = filepath.Join(filepath.Dir(b), "../..") )
Functions ¶
func DirFiles ¶
DirFiles returns the list of files in the tree rooted at dir, replacing the directory name dir with prefix in each name. The resulting names always use forward slashes.
Types ¶
type Hash ¶
A Hash is a directory hash function. It accepts a list of files along with a function that opens the content of each file. It opens, reads, hashes, and closes each file and returns the overall directory hash.
func HashFnv ¶
HashFnv is the "hfnv:" directory hash function, using any algorithm.
HashFnv is "hfnv:" followed by the base64-encoded hash of all given files with the allowed suffix specified.
More precisely, the hashed summary contains a single line for each file in the list, ordered by sort.Strings applied to the file names, where each line consists of the hash of the file content, two spaces (U+0020), the file name, and a newline (U+000A).
File names with newlines (U+000A) are disallowed.