Documentation
¶
Index ¶
- Variables
- func Copy(srcBase, dstBase string, paths map[string]string) (err error)
- func HashFileGlobs(basepath, dirpat string, filepats ...string) (map[string]string, error)
- func HashPath(path string) (string, error)
- func HashReader(r io.Reader) (string, error)
- func IsHashedPath(path string) bool
- func Link(srcBase, destBase string, paths map[string]string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsDir = errors.New("Tried to hash the path of a directory")
ErrIsDir is returned by HashPath when attempting to hash a directory
Functions ¶
func HashFileGlobs ¶
HashFileGlobs returns a map from filepaths to their HashPath equivalent for all files whoses parents match the dirpat regex and themselves match one of the filepat globs.
func HashPath ¶
HashPath opens the file at the provided filepath and returns a string containing the file's hash as part of its filename
func HashReader ¶
HashReader reads the provided io.Reader and returns its MD5 hash as a string or an error.
func IsHashedPath ¶
IsHashedPath returns true if a filepath matches the pattern path/name.HASH.ext, where HASH is an MD5 hash.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.