MCPcopy
hub / github.com/rclone/rclone / AddHash

Method AddHash

fs/operations/operations.go:2293–2301  ·  view source on GitHub ↗

AddHash adds the hash of the type given to the output

(ht hash.Type)

Source from the content-addressed store, hash-verified

2291
2292// AddHash adds the hash of the type given to the output
2293func (l *ListFormat) AddHash(ht hash.Type) {
2294 hashName := ht.String()
2295 l.AppendOutput(func(entry *ListJSONItem) string {
2296 if entry.IsDir {
2297 return ""
2298 }
2299 return entry.Hashes[hashName]
2300 })
2301}
2302
2303// AddID adds file's ID to the output if known
2304func (l *ListFormat) AddID() {

Callers 4

LsfFunction · 0.95
DstLsfFunction · 0.95
TestListFormatFunction · 0.95
SetListFormatMethod · 0.95

Calls 2

AppendOutputMethod · 0.95
StringMethod · 0.65

Tested by 2

DstLsfFunction · 0.76
TestListFormatFunction · 0.76